I got this much information regarding excel file I want to display.
strFileName contains the entire file path.
Dim theWorkbook As Excel.Workbook
theWorkbook = excelobj.Workbo oks.Open(strFil eName, 0, True, 5, "", "", True, Excel.XlPlatfor m.xlWindows, "\t", False, False, 0, True)
Dim sheets As Excel.Sheets = theWorkbook.Wor ksheets
I am not able to index them like
sheets(1) or sheets.item(1).
Also there is no function like sheets(1).getIt em
I want to get the name of all spreadsheets in that excel file.
Later i have to use it in the place of [General Shift$] in
Dim myCommand As New OleDbDataAdapte r("SELECT * from [General Shift$]", strConn) '[General Shift$]
Dim myDataSet As New DataSet()
myCommand.Fill( myDataSet, "ExcelInfo" )
GridView1.DataS ource = myDataSet.Table s("ExcelInfo"). DefaultView
GridView1.DataB ind()
Please help .
strFileName contains the entire file path.
Dim theWorkbook As Excel.Workbook
theWorkbook = excelobj.Workbo oks.Open(strFil eName, 0, True, 5, "", "", True, Excel.XlPlatfor m.xlWindows, "\t", False, False, 0, True)
Dim sheets As Excel.Sheets = theWorkbook.Wor ksheets
I am not able to index them like
sheets(1) or sheets.item(1).
Also there is no function like sheets(1).getIt em
I want to get the name of all spreadsheets in that excel file.
Later i have to use it in the place of [General Shift$] in
Dim myCommand As New OleDbDataAdapte r("SELECT * from [General Shift$]", strConn) '[General Shift$]
Dim myDataSet As New DataSet()
myCommand.Fill( myDataSet, "ExcelInfo" )
GridView1.DataS ource = myDataSet.Table s("ExcelInfo"). DefaultView
GridView1.DataB ind()
Please help .
Comment