Hi,
I need to get the Id of chart drawing in a worksheet.
With the openxml SDK, I use the GraphicFrame.NonVisualGraphicFrameProperties.NonVisualDrawingProperties.Id property
How to do this with aspose.cells ?
Best regards
Christophe
Hi Christophe,
Workbook book = new Workbook(myDir + “sample.xlsx”);
Worksheet sheet = book.Worksheets[“Sheet Name”];
foreach (Chart chart in sheet.Charts)
{
Console.WriteLine(chart.Name);
}
Hi,
Your code snippet list all chart name of a worksheet but not the chart id.
In openxml the chart name is returning by GraphicFrame.NonVisualGraphicFrameProperties.NonVisualDrawingProperties.Name property
I need the chart id (in the attached file, the chart id is “1028” and the chart name is “Graphique 1”)
Regards
Christophe
Hi Christophe,
Hi,
there is no way to identify two charts (or more) in a worksheet
This is a blocking problem in my product.
Have you planned this ticket for a future version ? When ?
Regards,
Christophe
Hi Christophe,
Hi,
Your affirmation that “the chart name is unique within a worksheet so no two charts could have the same name.” is not right, the workbook attached has two chart with the same name in the worksheet. This is a hand-made workbook.
Regards,
Christophe Mari
Hi Christophe,
Hi,
Have you planned this ticket ?
Regards,
Christophe
Hi Christophe,
Thanks for your posting and using Aspose.Cells
We are afraid, there is no update for you at this moment. However, we have logged your comment in our database against this issue and requested the development team to provide some fix or ETA for this issue. Once, there is good news for you, we will let you know asap.
Hi,
Thanks for your using Aspose.Cells.
We have fixed this issue. Please use Shape.Id (or Chart.ChartObject.Id ) property.
Please download and try the latest fix: Aspose.Cells for .NET v8.2.2.3 and let us know your feedback.
It’s worked fine.
Thank you
Christophe Mari
Hi Christophe,
Thanks for your feedback and using Aspose.Cells.
It is good to know that your issue is fixed with the latest version. Let us know if you encounter any other issue, we will be glad to look into it and help you further.
Hi,
A little precision, it’s worked fine only for openxml workbook.
For xls woorkbook, the id is wrong.
Best regards,
Christophe Mari
Hi Christophe,
Thanks for your feedback and using Aspose.Cells.
Kindly provide some xls workbook with your chart and chart id to test this issue at our end. Please also let us know what are the steps you take to know the chart id of your chart in Microsoft Excel.