Spire.XLS is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Mon Oct 31, 2022 2:48 am

string xlxsfile = "C:\\Test\\test.xlsx";
book = new Spire.Xls.Workbook();
book.LoadFromFile(xlxsfile);
book.ConverterSetting.SheetFitToPage = true;

book.SaveToFile(pdfFile, Spire.Xls.FileFormat.PDF);

I used the simple attached excel file, and run above simple code and failed. Can anybody help?
Attachments
test.zip
(19.61 KiB) Downloaded 37 times

vdavidchen
 
Posts: 1
Joined: Mon Oct 31, 2022 2:41 am

Mon Oct 31, 2022 8:39 am

Hello,

Thanks for your inquiry.
I created a console project with .Netframework4.8 and using the latest version ofSpire.Xls 12.10.1 to test your scenario, I can get the pdf result document and attach pdf document for your reference. If you don’t use the latest version of Spire.Xls, please update and have a test, if the issue still exists, please offer the following message to help us do further investigation. Thanks for your assistance in advance.
1) Application type, such as Console App, .NET Framework 4.8.
2) Your test environment, such as OS info (E.g. Windows 7, 64-bit) and region setting (E.g. China, Chinese).


Sincerely
Abel
E-iceblue support team
Attachments
result.zip
(76.88 KiB) Downloaded 46 times
User avatar

Abel.He
 
Posts: 800
Joined: Tue Mar 08, 2022 2:02 am

Mon Nov 14, 2022 8:43 am

Hello,

Greeting from E-iceblue.
Has your problem been effectively solved now? Could you give us some feedback at your convenience?

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 800
Joined: Tue Mar 08, 2022 2:02 am

Return to Spire.XLS