Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application, both ASP.NET web sites and Windows Forms application.

Tue Oct 30, 2018 2:23 pm


i try to convert test.xlsx to pdf
test.xlsx has only 1 sheet and 1 Cell with "Hello World"
I've saved the xlsx with office 2016
i use freespire.xls

this is what i do:

Code: Select all
using Spire.Xls;
using System;
using System.IO;
namespace XLSXToPDFTest
    class Program
        static void Main(string[] args)
                Workbook workbook = new Workbook();
                // load Excel file
                workbook.LoadFromFile("C:\\test\\test.xlsx, ExcelVersion.Version2010");

                // convert to PDF file format
                workbook.ConverterSetting.SheetFitToPage = true;

                // save the file
                workbook.SaveToFile("C:\\test\\test.pdf", FileFormat.PDF);

the error:
'xr2' ist ein nicht deklariertes Präfix. Zeile 1, Position 359.

bei System.Xml.XmlTextReaderImpl.Throw(Exception e)
bei System.Xml.XmlTextReaderImpl.Throw(String res, String arg, Int32 lineNo, Int32 linePos)
bei System.Xml.XmlTextReaderImpl.LookupNamespace(NodeData node)
bei System.Xml.XmlTextReaderImpl.AttributeNamespaceLookup()
bei System.Xml.XmlTextReaderImpl.ParseAttributes()
bei System.Xml.XmlTextReaderImpl.ParseElement()
bei System.Xml.XmlTextReaderImpl.ParseElementContent()
bei System.Xml.XmlTextReaderImpl.Read()
bei System.Xml.XmlTextReader.Read()
bei System.Xml.XmlTextReaderImpl.Skip()
bei System.Xml.XmlTextReader.Skip()
bei spr3195.13(XmlTextReader A_0)
bei spr718.16()
bei spr718.24()
bei spr2433.0(spr4329 A_0)
bei spr4329.0(Stream A_0, spr1796 A_1, Boolean A_2)
bei spr4329..ctor(Stream A_0, spr1796 A_1)
bei Spire.Xls.Core.Spreadsheet.XlsWorkbook.SaveToPdf(Stream stream, ConverterSetting convertSetting)
bei Spire.Xls.Core.Spreadsheet.XlsWorkbook.SaveToPdf(String fileName, ConverterSetting convertSetting)

thank you


Posts: 4
Joined: Sat May 28, 2016 2:20 pm

Wed Oct 31, 2018 2:29 am

Dear Lupo,

Thanks for your inquiry.
I did notice the issue with our free version, sorry for that and I have to tell we have no plan to maintain the free version at present. I have confirmed your case worked well with our commercial version (Spire.XLS Pack(Hotfix) Version:8.10.7), please upgrade to this version to have a test. To help you better evaluate our commercial version, our sale team just sent a temporary license (one month free) of Spire.XLS to your email, please refer to the following guide on how to apply the license.

E-iceblue support team
User avatar

Posts: 986
Joined: Tue Sep 27, 2016 1:06 am

Wed Oct 31, 2018 7:23 am

ok thank you very much


Posts: 4
Joined: Sat May 28, 2016 2:20 pm

Wed Oct 31, 2018 7:32 am

Dear Lupo,

Thanks for your quick response.
Just feel free to contact us if you need further assistance. Wish you all the best!

E-iceblue support team
User avatar

Posts: 949
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.XLS