Hi,
I my Blazor Server app I am using the latest version of Syncfusion.XlsIO and Syncfusion.XlsIORenderer. I am trying to take an existing Excel file and convert it to PDF. On most of the worksheets in the Excel file, there are some formulae set. Opening the Excel file, I can see the formulae and their results as values, but when converting it to PDF using the Blazor server app, the values of the formulae are all 0.
Here is the code used to convert the Excel file to PDF:
using ExcelEngine excelEngine = new ExcelEngine(); IApplication application = excelEngine.Excel; application.DefaultVersion = Syncfusion.XlsIO.ExcelVersion.Xlsx; using FileStream inputStream = new FileStream("./ExcelFiles/PrintJobCard.xlsx", FileMode.Open, FileAccess.Read); IWorkbook workbook = application.Workbooks.Open(inputStream); application.XlsIORenderer= new XlsIORenderer(); application.FallbackFonts.InitializeDefault(); XlsIORenderer renderer = new XlsIORenderer(); PdfDocument pdfDocument = renderer.ConvertToPDF(workbook); MemoryStream stream = new MemoryStream(); pdfDocument.Save(stream); stream.Position = 0;
|