Cell settings are not fully displayed when converting from word wrap to PDF, but can be displayed normally when converting to html image.png (57.5 KB) image.png (24.7 KB) image.png (45.0 KB)
Thanks for the template file, output files and screenshots.
If you could save your Excel file to HTML (Web page) and PDF in MS Excel manually, you will also notice this issue. This is due to those merged cells and MS Excel cannot wrap text for merged cells. But Aspose.Cells does provide relevant API to auto-fit merged cells for wrapping text/data. Please try the following (updated) sample code, it will work fine:
e.g. Sample code:
Workbook workbook = new Workbook("D://Aspose//EPPR_56822//EPPR_56822.xlsx");
AutoFitterOptions options = new AutoFitterOptions();
options.setAutoFitMergedCellsType(AutoFitMergedCellsType.EACH_LINE);
workbook.getWorksheets().get(0).autoFitRows(options);
workbook.save("D://Aspose//EPPR_56822//EPPR_56822", SaveFormat.HTML);
workbook.save("D://Aspose//EPPR_56822//EPPR_56822.pdf", SaveFormat.PDF);
Thank you for your method, but it is verified that there are still some problems with column width calculation. For example, the parts marked below have data through the pdf editor, but they are not displayed on the pdf
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.