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

Free Support Forum - aspose.com

Data missing when I export Excel file into Pdf file

I am working with Aspose Cells 19.11 and Aspose.PDF 17.4

I try to export data in an excel file to PDF, but I lost data which are in Smart Art Element.
I try to force refresh data with this:

WorkbookDesigner wd = new WorkbookDesigner(book);
wd.CalculateFormula = true;
wd.UpdateReference = true;
wd.Workbook.Save(“mydoc.pdf”, Aspose.Cells.SaveFormat.Pdf);
wd.Workbook.Save(“mydoc.xlsx”, Aspose.Cells.SaveFormat.Xlsx);

The excel Result file:

The PDF file result:

Do you have any idea why data do not appear in the PDF export?


Thanks for the screenshots and sample code segment.

If you are not using Smart Markers, then you do not need to use WorkbookDesigner class. Your code can be simplified as:
Sample code:

Workbook workbook = new Workbook(stringFilePath);
workbook.Save(“mydoc.pdf”, Aspose.Cells.SaveFormat.Pdf);
workbook.Save(“mydoc.xlsx”, Aspose.Cells.SaveFormat.Xlsx);

If you still find the issue, kindly do provide your template Excel file, we will check it soon.

PS. please zip the file prior attaching.

Thanks for your answer but I still have the issue.
I zip you my template as you asked.
AnnualReportTemplate.zip (144.1 KB)

Thanks for your reply.


Thanks for the template file.

I opened your template file into MS Excel manually but those Smart Art labels in the chart are not shown either, I took the print preview of the sheet in MS Excel. I used the code segment and saved to PDF via Aspose.Cells APIs. Also, I rendered to PDF in MS Excel (2013) manually. Now I compare both output PDFs and found no difference. In short, this is not an issue with Aspose.Cells as Aspose.Cells renders to Pdf same as per MS Excel’s rendered PDF or as per its print preview in MS Excel. Please find attached both files for your reference.
out1AnnualReportTemplate_Excel.pdf (339.6 KB)
outbyAspose.Cells.pdf (161.1 KB)

Thanks for your answer.
The template is empty. It is for this reason you do not have any data.
I join a new template with data.
AnnualReportTemplate.zip (144.8 KB)

I have tried your sample code with the latest template file but could not observe any issue. Could you please try it again using the latest version 19.11 and share the feedback. I am attaching the output files for your reference here.

string path = @"E:\";
Workbook workbook = new Workbook(path + @"AnnualReportTemplate.xlsx");
WorkbookDesigner wd = new WorkbookDesigner(workbook);
wd.CalculateFormula = true;
wd.UpdateReference = true;
wd.Workbook.Save(path + @"mydoc2.pdf", Aspose.Cells.SaveFormat.Pdf);
wd.Workbook.Save(path + @"mydoc2.xlsx", Aspose.Cells.SaveFormat.Xlsx);

mydoc2.pdf (137.0 KB)
mydoc2.zip (141.7 KB)


Please try our latest version/fix: Aspose.Cells for .NET v19.11.7 (attached)
Aspose.Cells19.11.7 For .Net2_AuthenticodeSigned.Zip (5.0 MB)
Aspose.Cells19.11.7 For .Net4.0.Zip (5.0 MB)

and execute the code segment to provide your output PDF with your template file, we need to check it.

Yes it is working when I use more recent version of Aspose.
Thanks alots.


Good to know that latest fix/version works well for your scenario/ case. Feel free to write us back if you have further queries or comments, we will be happy to assist you soon.