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

Free Support Forum - aspose.com

Delete chart


I use aspose.cells on a vb.net project.
I open an Excel document where there are two charts (“Chart 3” and “Chart 2”).
In my treatment i must, in some cases, delete the first chart.
How can i do ?

Thanks for advance.


Thanks for your inquiry.

May the following sample code help you for your need, kindly consult it:

Sample code:

Dim book As Workbook = New Workbook()
'Get the first worksheet charts collection.
Dim charts As Charts = book.Worksheets(0).Charts
'Delete the first chart in the sheet.

And be sure to use the latest version / hotfix.

Thank you.

Thanks a lot :slight_smile: