Free Support Forum -

Excel to PDF Column width Issue

I am trying to convert an excel to pdf using Aspose. I have a table in each sheet and i would like to span all the columns in the table to the complete pdf page. I have tried autofitting as well as setting standard width . But that doesnt seem to work. Could you please help me with some solution ?


Thanks for providing us some details.

Well, Aspose.Cells does render Excel spreadsheet to PDF file format as the worksheets are shown in print preview of the sheets (when taken in MS Excel manually). So, you should manually apply auto-fitting columns operations and then check the print preview of the sheets if you see same results as per Aspose.Cells or different results. You can also render to PDF in MS Excel manually to compare the file with the output PDF file by Aspose.Cells APIs. In case, you find Aspose.Cells gives different results, please provide us sample code (runnable) and template Excel file to show the issue, we will check it soon.


Thanks for using Aspose APIs.

It seems that you want to make all the columns into one page, please try AllColumnsInOnePagePerSheet in PdfSaveOptions for your needs.