Free Support Forum - aspose.com

ChartData.SetRange InvalidOperationException: Numeric data not found

Hi!

We have a very strange issue when updating the data for a chart in a PowerPoint representation. Unfortunately we cannot easily provide a source-code with a test case, because we only have this issue occurring in one customer environment (it works in our own environments with the exact same data, PowerPoint file and source-code).

What happens is this:
image.png (27.5 KB)

We know that you cannot reproduce this issue without a sample application, but this is currently very difficult to achieve, because it only happens (consistently) in the mentioned customer environment. But maybe you have an idea what is involved in your SetRange method and if you have any idea what could cause the issue (e.g. does it depend on regional settings of the computer when interpreting number formats etc.)?

Kind Regards,
Bernd

@bernd.podhradsky
Thank you for the issue description. What version of Aspose.Slides are you using?

Thanks for your reply. We are using 21.2 (the newest, as far as I know) for .NET.

@bernd.podhradsky
We have investigated the issue. The exception with “Numeric data not found” message is thrown if there are no numeric cells in a specified range of cells only. We found no dependencies on regional settings or other environment settings.

Hi!

Thanks for your answer. I think we have found the issue: the formula we are setting in the SetData method references “Sheet1”. This, however, only works in English versions of PowerPoint. Our customer has a german version which is why the sheet name cannot be found. Is there any way to reference the first sheet differently or to find out the name of the sheet through the API?

Kind Regards,
Bernd

@bernd.podhradsky
Aspose.Slides does not require PowerPoint installation of any versions. Could you share more details about using worksheet names and language settings on your end, please?

Sure. If you create a PPTX with the German version of PowerPoint and you add an MSO Chart, the worksheet that contains the data is called “Tabelle1” or something like that. If you create the PPTX with an English version of PowerPoint and you do the same, the worksheet is called “Sheet1”.

In the formula which is passed to the SetRange method, we use Sheet1 as the worksheet reference. However, this only works for PPTX created using an English PowerPoint and it fails when using PPTX that have been created in other languages. Unfortunately there is now way to get the name of the worksheet in a PPTX (we exported the workbook to XLSX by using the export function and checked manually that the sheet names are indeed different depending on the language).

Bernd

@bernd.podhradsky
Thank you for the additional details. I have logged the issue in our tracking system with ID SLIDESNET-42449. Our development team will implement the described ability. You will be notified when it is added to Aspose.Slides.