MSChart

  • Thread starter Thread starter Jasper Recto
  • Start date Start date
J

Jasper Recto

Hello,
I'm a beginner programmer. I'm trying to make a simple chart using MSChart
active x control. I have a spreadsheet with 2 colums of data, I want to
create a 3D bar graph. How do I create the chart using the spreadsheet?

Thanks,
Jasper
 
you will need to pull the data into either an array or a datatable.....
and apply it to the grid

To read the spreadsheet..... you will need to configure an adapter......

this will rad the datainto a DS...... for you........

Dim DS As System.Data.DataSet

Dim MyCommand As System.Data.OleDb.OleDbDataAdapter

Dim MyConnection As System.Data.OleDb.OleDbConnection

Dim dr() As Object

MyConnection = New System.Data.OleDb.OleDbConnection( _

"provider=Microsoft.Jet.OLEDB.4.0; " & _

"data source=" & UCase("YOUR PATH & FILE GOES HERE") & "; " & _

"Extended Properties=Excel 8.0;")

' Select the data from Sheet1 of the workbook.

MyCommand = New System.Data.OleDb.OleDbDataAdapter( _

"select * from [SHEET1$]", MyConnection)

DS = New System.Data.DataSet


HTH...... ALOHA
 
Back
Top