Hello, i face an exception with the pdf convertor, and no way to get rid of it.
Find below the code, simply loading the file and attempting to convert it and enclosed the sample file.
System.ArgumentNullException: 'Value cannot be null.
Parameter name: PivotTable cannot be created for table with Named Range'
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
FileStream excelStream = new FileStream(@"master.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(excelStream);
XlsIORenderer renderer = new XlsIORenderer();
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook); // fail here
Stream stream = new FileStream(@"output.pdf", FileMode.Create, FileAccess.ReadWrite);
pdfDocument.Save(stream);
excelStream.Dispose();
stream.Dispose();
}
Thanks for your help.
Reproduced using nugetversion 16.4.0.54 using a dot net core 2.2 console app.
Attachment:
master_746288b8.zip