AutoFitColumns WrapText issue

Hi,
We have issue in latest version of aspose.cells.dll for .net version 8.0.2.0.The output pdf document cannot change wrap text the column(B2,D2,F2,H2,J2,L2).If i apply AutoFitColumns option to excel sheets the wraptext not changed to cells.I have attached orginal xls document(Orginal.xlsx) and output pdf document(Issue_Document.pdf).
please find the below sample code to reproduce the issue,

void ExcelToPdf()
{
//Initialize a new Workbook
//Open an Excel file
Workbook workbook = new Workbook(@"C:\Users\jayaseelan.SIT\Desktop\Orginal.xlsx"); WorksheetCollection wsc = workbook.Worksheets;
for (int i = 0; i < wsc.Count; i++)
{
wsc[i].AutoFitRows();
wsc[i].AutoFitColumns();
}
// Implement one page per worksheet option
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.OnePagePerSheet = true;
workbook.Save(FilePath + "\\" + Path.GetFileNameWithoutExtension(InputFileName) + ".pdf", pdfSaveOptions);
}

i have attached expected output document for your reference(document name:Expected_Document.pdf)

please let me do know if you need any information.

Thanks
jayaseelan


Hi,


Thanks for the sample files and sample code.

After an initial test, I observed the issue as you mentioned by using your sample code with your template file.
e.g
Sample code:

//Initialize a new Workbook
//Open an Excel file
Workbook workbook = new Workbook(@“e:\test2\Orginal.xlsx”);
WorksheetCollection wsc = workbook.Worksheets;
for (int i = 0; i < wsc.Count; i++)
{
wsc[i].AutoFitRows();
wsc[i].AutoFitColumns();
}
// Implement one page per worksheet option
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.OnePagePerSheet = true;
workbook.Save(“e:\test2\out1.pdf”, pdfSaveOptions);


I have logged a ticket with an id “CELLSNET-42701” for your issue. We will look into it to figure it out soon.


Thank you.

@jayaseelan

Thanks for using Aspose APIs.

This is to inform you that we have fixed your issue CELLSNET-42701 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

The issues you have found earlier (filed as CELLSNET-42701) have been fixed in Aspose.Cells for .NET 18.4. Please also check the document/article for your reference: Install Aspose Cells through NuGet|Documentation