Chart title with formula issue

Hi!

We are trying the following scenario with Aspose.Cells 5.0.0.12:
1) Open report template with chart, where chart title have a reference to another cell ($G$3 in attached example).
2) Change value in source cell for title ($G$3).
3) Save file.

Expected result - Chart Title should be changed to the new cell value.
But actual result - Chart Title drops the formula and remains with old text value.

Source and result files and screenshoots are attached.
Could you help by resolving this issue?

Thank you,
Alex.

Hi Alex,

I am able to notice the problem. It has been logged in our Issue Tracking system as CELLSNET-18356. Once this problem gets resolved, we will let you know. We are sorry for this inconvenience.

Hi,

Please try the following sample code to change the title of the chart in the template:

Workbook mybook = new Workbook();
mybook.Open(@“e:\test\ChartTitleSource.xlsx”, FileFormatType.Xlsx);
mybook.Worksheets[0].Cells[“G3”].PutValue(“Office code: 001”);
Chart chart = mybook.Worksheets[0].Charts[0];
chart.Title.Text = mybook.Worksheets[0].Cells[“G3”].StringValue;
mybook.Save(@“e:\test\ChartTitleSource_updated.xlsx”, FileFormatType.Xlsx);


For further reference on how to manipulate existing charts in the template file, see the document:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/manipulating-designer-charts.html


Thank you.

Hi, Amjad!

Thank you for providing code sample. Most probably, we will have to use something like that.
However, this solution is not so convenient as referencing cell from Chart Title for us.
We are trying to build simple reporting solution where processing of each file is quite straightforward:
1) Open excel report template.
2) Fill a few ranges\cells with data.
3) As the result we expect an excel file where all formulas, charts and so on will be auto updated.

Obviously, in generic solution we cannot reference chart by simple mybook.Worksheets[0].Charts[0]; because there can be multiple worksheets, multiple charts. But certainly we can workaround this issue by building more complicated solution.

It would be great if this feature will be implemented in upcoming releases :slight_smile:

Thank you for your help!
Alex.

Hi,

Thanks for sharing details.

As we have already added your issue with id: CELLSNET-18356 (as mentioned by Salman Shakeel), we will figure it out soon.

Thank you.

Hi Alex,

We have fixed the issue regarding chart title with formula in attached hotfix. Please try using the attached version.

Great! Thank you, guys!

The issues you have found earlier (filed as 18356) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan