We are using Aspose.Cells v7.3.5.0 and Aspose.Pdf v7.6.0.0, and we have an Excel 2007 document (see attached) that has multi-line text in some cells. Note this is text that contains line breaks, not wrapped text. In the attached document, see the first sheet (Screening Day - 28) cell H32 for an example (there are others, but that is the most obvious one). When we convert this document to PDF, the cells containing multi-line text are truncated to just the first line (the remaining text isn’t just hidden, it’s gone), and the row height is shrunken to fit just the one line. We’ve attempted calling AutoFitRows, but that doesn’t seem to have any effect.
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
We have found this issue. We have attached the screenshot for your reference. We have logged this issue in our database. We will look into this issue and resolve it. Once the issue is resolved or we have some other update for you, we will share it with you asap.
This issue has been logged as CELLSNET-41536
.
I've attached screenshots of the specific problem I was referencing in the original post. In the Excel version note the multi-line text in the cell (circled in red), and note that the PDF version has only the first line of text, and the cell is collapsed (also circled in red).
Hi,
Hi,
foreach(Worksheet ws in workbook.Worksheets)
{
ws.AutoFitRows(true);
}
Hello,
Thank you for taking the time to look at this issue for us. I have implemented the solution you offered, but unfortunately it doesn't appear to have made any difference. The resulting PDF appears exactly as the screenshots above--the worksheet cells that contain newlines (NOTE: not wrapped lines, but actual newline characters) still get truncated and collapsed.
Thanks,
Dave Frogley
Hi,
Hello again,
My apologies, I realized after some more testing that the test I was running had been modified to do something else, so AutoFitRows wasn't actually getting called as I thought it was. Oops :)
I ran the test again, this time calling AutoFitRows, and it worked for me as you suggested. Thank you. I'll let our clients know and see if it also works for them.
Thanks!
Dave Frogley