Error when adding Chart to Excel Worksheet

I am using Aspose Cells for .NET and getting an error when opening a worksheet which contains an inserted chart. The file generates fine, but when the worksheet is opened an error pops up stating “File Error: data may have been lost”. If the file is saved again, the next time it is re-opened the chart is gone from the worksheet.

The code i am using to insert the chart is as follows:

chartIdx = worksheet.Charts.Add(ChartType.Column, 0, 3, 27, 9)

Any information on how to correct this issue would be greatly appreciated.

Thanks

Hi,

Which version you are using? I don't find any issue at all. I did create the column chart using Aspose.Cells APIs and then open the output file into MS Excel (2000-2007), I don't find your error i.e. "File Error... data may have been lost...".

Could you try the latest version 4.4.2.0: http://www.aspose.com/community/files/51/file-format-components/aspose.cells/entry121168.aspx

If you still find the issue, kindly post your complete sample code with template file to show the issue, We will check it soon.

Thank you.

Hi I’m actually using an older version, Aspose.Excel Version 3.6.2.0. It appears that the new version (Aspose.Cells) doesn’t have this issue. Is there a patch to fix this on the older versions?

Thanks,

Hi,

Thanks for considering Aspose.

Well, since you are using some older version which might show this error, so, I 'm afraid you have to upgrade to the latest Aspose.Cells. The older Aspose.Excel has been renamed to become Aspose.Cells now and thus we cannot have / provide any patch for the older Aspose.Excel bugs. The only alternative is to upgrade to Aspose.Cells. The new Aspose.Cells is more reliable, stable and prosperous with enhanced and advanced functionality. Aspose.Cells's new calculation engine supports a variety of fomulas / functions for your need. I think there is not much labour involved upgrading to the newer Aspose.Cells. However, when you upgrade to the newer Aspose.Cells,

Please note:

Some APIs (classes, struct, enumerations) are added based on some advanced features that we now offer, the previous classes (with their members) are retained and optimised but a few classes are renamed, some additional members (properties, methods etc.) are also included of the classes with a very few excluded.

Following is the classes list which are renamed:

1. Excel class is replaced by Workbook class.

2. ExcelDesigner class is replaced by WorkbookDesigner class.

3. ExcelHelper class is replaced by CellsHelper class.

For more info, please check the Aspose.Cells Documentation with APIs: http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/index.html

Hope, it will help you. You may use the latest version i.e. 4.4.2.0 downloading @: http://www.aspose.com/community/files/51/file-format-components/aspose.cells/entry121168.aspx

Thank you.