Hello,
We have a requirement where we need to fill large text in a single cell of excel. The number of lines in that single cell are increasing than the maximum row height allowed (409.5) by microsoft excel. In such a scenario, when the excel gets generated(even after using autofit row feature) the text is visible only till the maximum row height and the remaining text gets hidden. We can see all the data when we open the excel in edit mode and double click on that particular cell with large data. But the complete text is not visible in the pdf which we are generating directly from the excel. Only the text till the maximum row height gets displayed in the pdf. The remaining hidden data gets missed out in the pdf. We have used the below code to generate the excel:
final PdfSaveOptions saveOptions = new PdfSaveOptions(SaveFormat.PDF);
saveOptions.setAllColumnsInOnePagePerSheet(true);
try {
final AutoFitterOptions fitterOptions = new AutoFitterOptions();
fitterOptions.setAutoFitMergedCells(true);
afifWorkbook.getWorkbook().getWorksheets().get(0).autoFitRows(fitterOptions);
afifWorkbook.getWorkbook().save(response.getOutputStream(),saveOptions);
} catch (final IOException e) {
throw new FIFException(“IOError while trying to save excel file to the output stream”,e);
} catch (final Exception e) {
throw new FIFException(“Exception while trying to save excel file to the output stream”,e);
}
I have attached the sample excel and pdf file for your reference. (Check row 158 in the excel and page 5 in the pdf).
Please let us know if there is any exisitng way to fix this issue using aspose.cells
Thanks and Regards,
Bhakti