Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Dear All!

 

I use Visual Basic .NET 2003 and want to produce graphs by using Office Chart 11.0.

I would like to provide this chart with data from an Office Spreadsheet 11.0 and I use the following code I have found:

 

...

ChartSpace1.Clear()

ChartSpace1.Charts.Add()

Dim c = ChartSpace1.Constants

 

ChartSpace1.DataSource = Spreadsheet1 // Here's the problem

 

ChartSpace1.Charts(0).SeriesCollection.Add()

....

 

When I run this code, I get an error message saying that the specified cast is invalid, reffering to the line I marked (Datasource).

 

Does anyone know what what can be done to fix it?

Thanks!

Tom.

  • 2 weeks later...
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...