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:
and so on.Rows -> Evaluation time out
Sheet.Rows -> System.InvalidProgramException
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