Getting data into axSpreadsheet

G

Groovy

Hi

I would like to be able to get some data from a spreadsheet and place it
into a sheet within axSpreadsheet on my form.

I am currently able to get the data and place it into a DataGridView Control
but want to be able to get it from there into the axSpreadsheet or if at all
possible go straight from the spreadsheet into the axSpreadsheet.

I am currently using

CODE:-----------------------------------------------------------------------------------------

dataset.Tables.Add("Resolution")

connect = New
System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;" _
& "data source=" & pathname & ";Extended Properties=Excel 8.0;")

Res = New System.Data.OleDb.OleDbDataAdapter("select * from [Data$I2:I363]",
connect)

connect.Open()
Res.Fill(dataset.Tables("Resolution"))
Me.DataGridView1.DataSource = dataset.Tables("Resolution")
Res.Fill(dataset.Tables("Resolution"))
connect.Close()

CODE:-----------------------------------------------------------------------------------------

Thanks in advance

Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top