here is what I have but i need to do it so the .xls creator does not need to create a named range.
<%
Const adOpenStatic = 3
Const adLockPessimistic = 2
Dim cnnExcel
Dim rstExcel
Dim I
Dim iCols
Set cnnExcel = Server.CreateObject("ADODB.Connection"
cnnExcel.Open "DBQ=" & Server.MapPath("SampleData.xls" & ";" & _
"DRIVER={Microsoft Excel Driver (*.xls)};"
' Same as any other data source.
' FYI: TestData is my named range in the Excel file
Set rstExcel = Server.CreateObject("ADODB.Recordset"
rstExcel.Open "SELECT * FROM TestData;", cnnExcel, _
adOpenStatic, adLockPessimistic
' Get a count of the fields and subtract one since we start
' counting from 0.
iCols = rstExcel.Fields.Count
%>
thanks
<%
Const adOpenStatic = 3
Const adLockPessimistic = 2
Dim cnnExcel
Dim rstExcel
Dim I
Dim iCols
Set cnnExcel = Server.CreateObject("ADODB.Connection"
cnnExcel.Open "DBQ=" & Server.MapPath("SampleData.xls" & ";" & _
"DRIVER={Microsoft Excel Driver (*.xls)};"
' Same as any other data source.
' FYI: TestData is my named range in the Excel file
Set rstExcel = Server.CreateObject("ADODB.Recordset"
rstExcel.Open "SELECT * FROM TestData;", cnnExcel, _
adOpenStatic, adLockPessimistic
' Get a count of the fields and subtract one since we start
' counting from 0.
iCols = rstExcel.Fields.Count
%>
thanks