ExcelPackage: Including a chart in Office Open XML Format file creation

Jan 15, 2007 at 5:32 AM
This is in reference to the following title "ExcelPackage: Office Open XML Format file creation".

We have downloaded the sample, source code and the related files including the template for generating the .xlsx file from the .xlsx template and have made appropriate changes for the database connectivity and also commented out calls to sample1 and sample2, we are simply making a call to sample3 class. The source code compiles and executes as expected generating the valid resultant .xlsx file. however when we include a chart object in the template, though the source code compiles and executes fine but the resultant .xlsx file fails to open and prompts with the following message.

"Excel found unreadable content in 'sample3.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes."

If we opt to recover the contents by clicking Yes, the chart object does not appear.

Can anyone please suggest a solution to this. I need to include a chart object within the template.

Thanks in advance,

Debu