We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

AutoFitMergedCellsType.EachLine is not working

When we use latest dll or nuget version β€œ21.12.0”, we are facing a different issue which was reported and resolved earlier. Please check the issue which was reported earlier here - Autofit row height issue - Aspose.Cells Product Family - Free Support Forum - aspose.com

Please find the attached console app with latest dll or nuget version.AsposeTesting.zip (5.8 MB)

@PramodHegde,

I asked your to try latest fix (Aspose.Cells for .NET v21.12.6) instead of Aspose.Cells for .NET v21.12.0 (official release from Downloads section/Nuget repos.). It looks like Aspose.Cells for .NET v21.12.0 is still being used in your project. I did test your scenario/case using latest fix Aspose.Cells for .NET v21.12.6 (we shared earlier with you) and it works absolutely fine with it. See the attached output file on my end, The output file is fine tuned.
Output1.zip (14.5 KB)

We have tried different scenarios using the latest dll 21.12.6, but we got the below issues.

Point 1- With the below code---- Refer file- 1β€”we are getting ## instead of value – refer row- M316

Code

worksheet.AutoFitRows(new AutoFitterOptions
{
AutoFitMergedCellsType = AutoFitMergedCellsType.EachLine,
AutoFitWrappedTextType = AutoFitWrappedTextType.Paragraph,
MaxRowHeight = int.MaxValue,
OnlyAuto = true
});
worksheet.AutoFitColumns();

Point 2- With the below code---- Refer file- 2β€”issue mentioned in point 1 is getting resolved, however the autowrapping is not happening properly-- refer row- 274
Code

  worksheet.AutoFitRows(new AutoFitterOptions
                 {
                     AutoFitMergedCellsType = AutoFitMergedCellsType.EachLine,
                     AutoFitWrappedTextType = AutoFitWrappedTextType.Paragraph,
                     MaxRowHeight = int.MaxValue,
                     OnlyAuto = true

              });

            worksheet.AutoFitColumns(new AutoFitterOptions
            {
                AutoFitMergedCellsType = AutoFitMergedCellsType.EachLine,
                AutoFitWrappedTextType = AutoFitWrappedTextType.Paragraph,
                MaxRowHeight = int.MaxValue,
                OnlyAuto = true
            });

MergeSheetsFormat.zip (6.2 MB)

@PramodHegde,

Thanks for sharing your findings and samples.

We have recorded the samples with details against your issue"CELLSNET-50157" into our database. We will evaluate it thoroughly and get back to you soon.

Thanks @Amjad_Sahi: Please provide the fix details once you have it, as we are currently blocked.

@PramodHegde,

Sure, let us evaluate your issue thoroughly before we could update you on it.

1 Like

Can you please update on the issue? Any ETA by which we can expect fix?

@PramodHegde,

The issue is fixed and hopefully, we will provide the fixed version in the next few days.

Keep in touch.

The issues you have found earlier (filed as CELLSNET-50157) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao

We are now using the latest version, and using this we are again facing AutoFit issues.
please find the screenshot attached. Here in the below screenshot the last line’s height is not proper and its getting hidden when there are >1 line in the cell.
image.png (126.3 KB)

@PramodHegde,

Thanks for the screenshot.

Could you please create and share a sample console application (runnable), zip the project with Excel file and post us, we will check it soon.