We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

In Aspose.Cell how to Get Chart by Range

in Aspose.Cell how to Get Chart by Range

i have Aspose.Cells.Range range

i am trying to find chart object inside a range.

please provide an example



Well, you may get the chart by its index or name.



int index = worksheet.Charts.Add(ChartType.Column, 3, 3, 10, 8);

Chart chart = worksheet.Charts[index];


Workbook workbook = new Workbook();


//Get the first chart in the first worksheet of the excel file.

Aspose.Cells.Chart chart = workbook.Worksheets[0].Charts[0];

Thank you.

thanks for your reply, but the client doesn't know the index, but if you copy directly from excel from a range, the chart will copied as well...

is there any way i can find the chart index from a range...

thanks for your help