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 Oct 14, 2022 6:52 am

Hello Experts,

Im converting XLSX file into PDF file using spire.xls-12.9.1 API.

Sample code, sample source file and the image of exact error highlighted are attached for your reference.

After displaying 40 rows of tabular data, 2 data rows are not converted in PDF file.

I really appreciate your help on this.

MissingDataIssue.zip
(169.96 KiB) Downloaded 89 times

UshaThavasiappan
 
Posts: 109
Joined: Sat Oct 08, 2022 9:23 am

Fri Oct 14, 2022 10:04 am

Hello,

Thanks for your inquiry.
Since your Excel file set a print area that didn't include the last two rows. You can use the following code snippet to cancel the print area, and then convert it. If you have any further questions, please feel free to contact us
Code: Select all
Worksheet worksheet = workbook.getWorksheets().get(0);
PageSetup pageSetup = worksheet.getPageSetup();
pageSetup.setPrintArea(null);


Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Fri Oct 14, 2022 11:44 am

Hello Simple,
Your suggestion saved me :) . Thanks for your support.

UshaThavasiappan
 
Posts: 109
Joined: Sat Oct 08, 2022 9:23 am

Mon Oct 17, 2022 1:45 am

Hello,

Glad to hear that, if there is anything else we can do for you in the future, just feel free to contact us!

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.XLS