Hi,
I need to read data from an Excel sheet.
So far I managed to do so using:
Set ExcelConn = Server.CreateObject("ADODB.Connection")
Set ExcelRS = Server.CreateObject("ADODB.Recordset")
ExcelConn.Provider = "Microsoft.Jet.OLEDB.4.0"
ExcelConn.Properties("Extended Properties").Value = "Excel 8.0"
ExcelConn.Open defaultPath & "\" & f
set ExcelRS = ExcelConn.Execute ("SELECT * FROM [Sheet1$]")
While NOT ExcelRS.EOF
...
ExcelRS.MoveNext
Wend
ExcelRS.Close
ExcelConn.Close
set ExcelRS = NOTHING
set ExcelConn = NOTHING
This works as long as the sheet is named 'Sheet1'. Some of the users use
a localised version of Excel which names the first sheet differently (or
rename it manually). Is it possible to have ASP loop through the data on
the first sheet, regardless its name?
TIA!