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.

Thu Sep 16, 2021 1:18 pm

Hello,

First, thanks for your packages, they're really usefull.

I have a simple xls file, that i want to convert into a pdf file, to print on a specific printer.
When i use FreeSpire.Xls to convert the file, i have no problems, it works fine.
But if i print the pdf with the Spire.Pdf version include in the FreeSpire.Xls package, i have the "evaluation warning" on the top of my page.

So i added the freespire.pdf to print without this "warning", but in that case i have the following excetpion to the line
Code: Select all
Workbook wb = new Workbook();

"Could not load type 'spr᠔' from assembly 'Spire.XLS, Version=11.8.6.0, Culture=neutral, PublicKeyToken=663f351905198cb3' because it attempts to implement a class as an interface.":"spr᠔"

After some research, i found that i have to use FreeSpire.Office if i need more than one "Spire Package".
But when i use this last one, i have no more errors, but the created pdf is blank.

My Workbook contain a single sheet, with 13 cols and 49 rows. I don't know what to do...
Here's my code :
Code: Select all
Workbook wb = new Workbook();
wb.LoadFromFile(pathXls);
wb.SaveToFile(pathPdf, FileFormat.PDF);
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(pathPdf);
doc.PrintSettings.PrinterName = printerName;
doc.Print();


Thanks for your time,
Kind Regards

ImCraZiggs
 
Posts: 1
Joined: Thu Sep 16, 2021 1:00 pm

Fri Sep 17, 2021 12:31 pm

Hello,

Thank you for your inquiry.
I simulated an Excel file and tested with the Free Spire.Office and Commercial Spire.Office.NetCore, but neither of them replicated the issue you encountered. I would suggest that you give the latest commercial version (Spire.Office.NetCore 6.8.2) a try as it contains more fixes than the free version. If the problem still exists after trying, please provide your Excel file for future investigation. You could attach it here or send it to us via email (support@e-iceblue.com). Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.XLS