Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Fri May 22, 2020 9:11 am

Hi,

We have an issue with Excel to PDF conversion of one of our documents. I'll send the original spreadsheet and the resulted pdf via email as it contains client's sensitive data - the first row of "S&P Changes" column is incorrect (only "Upgrade" word is displayed). We are using Workbook.SaveToFile(pdfPath, FileFormat.PDF) for the conversion.

Thanks.

jon@alphakinetic.com
 
Posts: 2
Joined: Tue May 07, 2019 2:26 pm

Fri May 22, 2020 10:01 am

Hello,

Thanks for your post.
Ok, I will wait for your email and then investigate your issue further.

Sincerely,
Rachel
E-iceblue support
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Fri May 22, 2020 10:20 am

Hello,

Thanks for your sharing via email.
I tested your case and did reproduce your issue. This issue has been logged into our bug tracking system with the ticket SPIREXLS-2361. We will inform you if there is any progress. Sorry for the inconvenience caused.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Oct 31, 2024 9:22 am

Hi Jon,

Hope you are doing well. I’m writing to tell you the update about your issue.
By analyzing the internal data of your document, we found that there is no row height data for the 6th row. For this situation, our product internally will use "DefaultRowHeight" as its row height, which can only display one line of text, so the content of generated PDF is incorrect.
We have verified that if your documen is resaved in Microsoft Excel, the generated PDF is consistent with the source file.
Meanwhile, you can also invoke the method “AutoFitRow” to autofit the row height to display all the text, as shown below.

Workbook wb = new Workbook();
wb.LoadFromFile("original.xlsx");
//Get default row height
//double defaultRowHeight = wb.Worksheets[0].DefaultRowHeight;
//Autofit row height
wb.Worksheets[0].AutoFitRow(6);
wb.SaveToFile("out.pdf", FileFormat.PDF);

Sincerely,
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.XLS