XlsIORenderer convert to PDF does not show value of formula from xlsx

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;



2 Replies 1 reply marked as answer

EW Eddie Willcox July 31, 2025 07:48 AM UTC

Nevermind. I just added this code and it all works out perfectly now:



Marked as answer

KS Karthika Santhana Krishnan Syncfusion Team July 31, 2025 01:44 PM UTC

Hi Eddie,

 

If you have any questions or need assistance, feel free to contact us.

 

Regards,

Karthika S.


Loader.
Up arrow icon