J
JV
Fellow members,
I have read tons of content on the issue that ASP can not read Excel
spreadsheet columns having more than 256 characters. I think I've read
them all ...
Here's what I do:
strExcelDocName = "c:\test.xls"
With cnnExcel
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=" & strExcelDocName & ";" & _
"Extended Properties=""Excel 8.0;IMEX=1;"""
.Open
End With
Set rstExcel = Server.CreateObject("ADODB.Recordset")
sTableName = "[sheet1$]"
sTableName = "select * from " & sTableName & ";"
rstExcel.Open sTableName, cnnExcel, _
adOpenStatic, adLockPessimistic
rstExcel.MoveFirst
Do While Not rstExcel.EOF
'
myString = rstExcel.Fields.Item(0).Value
rstExcel.MoveNext
loop
By now, the experts among us have already detected that 'my_string'
won't store values exceeding 256 characters.
If any one you has found / developed ANY workaround (or alternative) I
would be very much obliged ...
Thanks in advance.
JV
I have read tons of content on the issue that ASP can not read Excel
spreadsheet columns having more than 256 characters. I think I've read
them all ...
Here's what I do:
strExcelDocName = "c:\test.xls"
With cnnExcel
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=" & strExcelDocName & ";" & _
"Extended Properties=""Excel 8.0;IMEX=1;"""
.Open
End With
Set rstExcel = Server.CreateObject("ADODB.Recordset")
sTableName = "[sheet1$]"
sTableName = "select * from " & sTableName & ";"
rstExcel.Open sTableName, cnnExcel, _
adOpenStatic, adLockPessimistic
rstExcel.MoveFirst
Do While Not rstExcel.EOF
'
myString = rstExcel.Fields.Item(0).Value
rstExcel.MoveNext
loop
By now, the experts among us have already detected that 'my_string'
won't store values exceeding 256 characters.
If any one you has found / developed ANY workaround (or alternative) I
would be very much obliged ...
Thanks in advance.
JV