We have charts, graph in our spreadsheet, based on data from another worksheet. We are updating the data programmatically using “aspose.cells” and allowing the user to download this file. The chart and graph are updated only after the user clicks “enable editing” (File is downloaded from internet, Excel always opens it in “Protected Mode”).
Thanks for your query.
Well, this is due MS Excel’s Protected View feature that opens documents in read-only mode, and disables editing functions or so. There is nothing to do with Aspose.Cells APIs. See the document on how to enable/disable this settings for your reference:
Hope, this helps a bit.
Thanks for your response.
We are not sure if this is because of “Enable Editing”.
Chart or graph showing old values that are in the excel template with the old data. We expect when we update the values/data using aspose it will refresh the chart or graph.
we tried using “CalculateFormula()” which doesn’t help. Is there any way we can refresh the chart or graph immediately after updating the data/values?
When you click “Enable Editing”, is the chart not updated?
If not, it might be an issue. Kindly do create a simple console application (runnable), zip the project and post us here with all the files, we will check it soon.
When I click “Enable Editing” the chart is getting updated. But we need to show the updated chart even before clicking “Enable Editing”. Will you able to help?
Well, you may try to call Chart.Calculate() before saving the file if it makes any difference.
Chart.Calculate() also not working.
Well, in that case, as I told you earlier it is MS Excel’s behavior and nothing to do with Aspose.Cells, so you will get updated chart when you does click “Enable Editing”. I also asked you to disable the relevant option in MS Excel (see my previous reply and refer to the online document), so the file could be opened without the security check.
I am not sure if we can ask our clients to do this adviced approach. Will try and let you know.