THE workaround for the Excel > 256 characters issue

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top