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 Mar 19, 2019 2:02 pm

Hello,

with NPOI 2.4.1 I created a xlsx-file. Now I want to convert this file to pdf ansd use Spire.XLS 9.3.4 for that in an ASP.NET MVC5 project.

My C#-code is:
Code: Select all
   Workbook workbook = new Workbook();
            workbook.LoadFromFile(PathToExcelFile);

            Worksheet sheet = workbook.Worksheets[0];

            string PathToPDF = @"D:\EME\Datenbanken\Diagnose\RezeptReports\"+DateTime.Now.ToString("yyyyMMddTHH:mm:ss")+"EMERecipeManagementSystem_Recipe_"+DetailMode+".pdf";

            //workbook.SaveToFile(PathToPDF, FileFormat.PDF);
            sheet.SaveToPdf(PathToPDF);


The error messages of the sheet are:
Rows -> Evaluation time out
Sheet.Rows -> System.InvalidProgramException
and so on.
There is only one sheet in the workbook and that should be converted to pdf.

For testing I loaded the file with NPOI, this works, so the path must be right.

What is going wrong?

Ottilie
Last edited by Ottilie on Wed Apr 03, 2019 9:06 am, edited 1 time in total.

Ottilie
 
Posts: 2
Joined: Tue Mar 19, 2019 1:50 pm

Wed Mar 20, 2019 3:21 am

Hello,

Thank you for contacting us.
To help us investigate your issue accurately, please share us with your xlsx-file. You could send it to us via email (support@e-iceblue.com). And don’t worry, we promise to keep your documents confidential and won’t use them for any other purpose.

Sincerely,
Lisa
E-iceblue support team
User avatar

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

Wed Mar 20, 2019 7:19 am

Hello Lisa,

actually we decided not to convert the xlsx-file, so my problem is a dead issue.

I can send the test file, if you still want it in this case.

Thanks

Ottilie

Ottilie
 
Posts: 2
Joined: Tue Mar 19, 2019 1:50 pm

Wed Mar 20, 2019 8:42 am

Hello Ottilie,

Thanks for your quick response.
Yes, please share us with your testing file. Then we will do further investigations, if there is some issues caused by our product. We will fix them to optimize our product. Thanks in advance.

Sincerely,
Lisa
E-iceblue support team
User avatar

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

Sun Apr 07, 2019 6:42 am

I cannot open .xlsx file.

I have the Microsoft Compatibility Pack installed.

I am using Microsoft Office XP Professional

Thanks

pinkcloud
https://www.sportzfuel.com/
User avatar

FranksoiRm
 
Posts: 2
Joined: Sat Mar 30, 2019 6:50 am
Location: Bulgaria

Mon Apr 08, 2019 6:10 am

Hi,

Thank you for contacting us.
Is your .xlsx file generated using our Spire.XLS? If so, please provide your .xlsx file which could not be opened as well as the code you used to generate it to help us further better investigate it. Thanks in advance.

Sincerely,
Nancy
E-iceblue support team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Wed Apr 10, 2019 9:20 am

Hi,

How is your issue now? Could you please give us some feedback at your convenienve? Thanks in advance.

Best Regards,
Nancy
E-iceblue support team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Return to Spire.XLS