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.

Tue May 08, 2018 7:50 am

hi, I've got the error message while convert excel to PDF with the code:
Code: Select all
workbook.SaveToFile('xx.pdf', FileFormat.PDF);

I use the FreeSpire.XLS version will get the error message: 'xr2' is an undeclared prefix.
I found the Spire.XLS will not get this error message.
how could I fix this error?
ps. this excel file is generated from EXCEL 2016.
Attachments
xr2_error.zip
(7.54 KiB) Downloaded 404 times

bestken
 
Posts: 2
Joined: Wed Apr 18, 2018 3:31 am

Tue May 08, 2018 8:39 am

Dear bestken,

Thanks for your inquiry.
Sorry for the inconvenience our free version caused. I have confirmed that your issue is solved using our commercial Spire.XLS Pack(Hotfix) Version:8.4.13.
Besides, our sales team has sent you a 1-month free license of Spire.XLS to help you remove the warning message and have a better evaluation on our product. Please refer to the following guidance on how to apply license.
https://www.e-iceblue.com/Tutorials/Lic ... ply_by_Key

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu May 10, 2018 8:03 am

Dear bestken,

Greetings from E-iceblue.
How is your issue going now ?
Could you please give us some feedback at your convenience ?

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue May 22, 2018 8:56 pm

Any chance this will be fixed in the NuGet Package for .NET? The current available version is 7.12.14.15040 and does not let me convert Excel 2016 (.xlsx) files to PDF.

I am able to save .xls to .xlsx using:

Code: Select all
   var workbook = new Workbook();
   workbook.LoadFromFile(currentFile.Path, ExcelVersion.Version97to2003);
   workbook.SaveToFile(xlsxFile, ExcelVersion.Version2013);


and then the export to PDF works fine. However, if file is of type .xlsx and created using Excel 2016 then the conversion to PDF fails with the "xr2" error. Could someone please explain what is going on in this scenario? Is there a workaround?

Thanks in advance!

Adam.Gilmore
 
Posts: 5
Joined: Tue May 22, 2018 8:46 pm

Wed May 23, 2018 2:29 am

Dear Adam.Gilmore,

Thanks for your inquiry.
At present, the latest available version is Spire.XLS V8.5.1 on NuGet. First please upgrade to this version and try again.
If your issue still exists, please provide your input Excel for further investigation.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon May 28, 2018 9:13 am

Dear Adam.Gilmore,

Hope you are doing well.
How is your issue going now ? Could you please give us some feedback at your convenience ?

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu May 31, 2018 12:09 pm

Hi Betsy,

This issue is related to FreeSpire.XLS. I am looking to get this functionality working in FreeSpire.XLS and not in the commercial version.

You can duplicate the issue by:
1. Installing the FreeSpire.Office NuGet Package in Visual Studio.
2. Create an Excel 2016 Workbook and add some test data.
3. Try converting to PDF using the code below:
Code: Select all
var workbook = new Workbook();
workbook.LoadFromFile("C:\temp\TestXLSX.xlsx");
workbook.SaveToFile("C:\temp\TestXLSX.xlsx", Spire.Xls.FileFormat.PDF);


Regards,
Adam

Adam.Gilmore
 
Posts: 5
Joined: Tue May 22, 2018 8:46 pm

Fri Jun 01, 2018 3:55 am

Dear Adam,

Thanks for your feedback.
I followed your steps, but could not reproduce your issue on my side. Note the file suffix in the code SaveToFile is ".pdf" rather than ".xlsx".
Besides, we don't have any plan to maintain our Free version, so sorry for this. All improvements are only included in commercial version. Now please upgrade your dlls to our latest Spire.Office Platinum (DLL Only) Version:3.4.2 and check if the issue is solved. If it still exists, please share your input document for further investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Jun 05, 2018 6:36 am

Dear Adam,

Greetings from E-iceblue.
How is your issue going now ? Could you please give us some feedback at your convenience ?

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Oct 24, 2019 9:57 pm

hi :) bross :)

rardbuh
 
Posts: 2
Joined: Wed Jun 12, 2019 12:08 am
Location: Mauritius

Fri Oct 25, 2019 1:25 am

Hi,

If there is any question while using our products, please do not hesitate to contact us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Sun Dec 01, 2019 11:17 am

i am from Italy hello. Can you help me translate? /rardor

rardbuh
 
Posts: 2
Joined: Wed Jun 12, 2019 12:08 am
Location: Mauritius

Mon Dec 02, 2019 2:11 am

Hi,

Thanks for your inquiry.
Sorry i don't know how to help you, can you describe your needs in detail?

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS