We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Save workbook as pdf leaves referenced fields blank

Hi I have a workbook with two sheets Data and totals.

Totals contains some functions such as SUM(Data!C3:C14) these fields do have values when I open my workbook in excel However when I save the workbook these fields are blanc.

When I use the save to pdf option in Excel the fields are updated correctly. Do I miss something?

I also Attached the sample pdf files for you to review.

This is the code I'm using:

_WorkBook.Save(@"c:\rontest.xlsx" , FileFormatType.Excel2007Xlsx);
Aspose.Cells.Workbook wb = new Workbook();
wb.Open(@"c:\rontest.xlsx", FileFormatType.Excel2007Xlsx);
wb.Save(sArchiveFileToSave, FileFormatType.Pdf);

Any help is appriciated,
Ron

Hi Ron,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Please use Workbook.CalculateFormula() method before using the file as Pdf. Please update you code as below:

_WorkBook.Save(@"c:\rontest.xlsx", FileFormatType.Excel2007Xlsx);

Aspose.Cells.Workbook wb = new Workbook();

wb.Open(@"c:\rontest.xlsx", FileFormatType.Excel2007Xlsx);

wb.CalculateFormula();

wb.Save(sArchiveFileToSave, FileFormatType.Pdf);

If you still face any problem, please share your excel file here and we will check it soon.

Thank You & Best Regards,

Hi Nausherwan,

This worked like a charm.
Thanks for your fast response.

Thanks,
Ron