Need help
-
I'm supposed to do a project using only XML, Microsoft Excel and Vb.Net. My problem here is that I'm supposed to plot a graph out with values extracted from an Excel file. Are there any ways to plot the graph without considering the size restrictions in Vb.Net (the size of the graph might be big), and how do we extract the values from the Excel file?
-
I'm supposed to do a project using only XML, Microsoft Excel and Vb.Net. My problem here is that I'm supposed to plot a graph out with values extracted from an Excel file. Are there any ways to plot the graph without considering the size restrictions in Vb.Net (the size of the graph might be big), and how do we extract the values from the Excel file?
You can extract the values from the excel file using following code: Private ds As DataSet Private myCommand As OleDbDataAdapter Private myConnection As OleDbConnection Private Sub FillDataSet() myConnection = New OleDbConnection( _ "provider=Microsoft.Jet.OLEDB.4.0; " & _ "data source=E:\EmbedBday\Bday.xls; " & _ "Extended Properties=Excel 8.0;") If Not myConnection Is Nothing Then myCommand = New OleDbDataAdapter( _ "select * from [sheet1$A1:A35]", myConnection) If Not myCommand Is Nothing Then ds = New DataSet myCommand.Fill(ds) myConnection.Close() End If End If DataGrid1.DataSource = ds End Sub where "Extended Properties" refers to the MSExcel version on your system which is Excel 8.0 for version higher than Excel 97(inclusive). Lata Agrawal