THE workaround for the Excel > 256 characters issue

Discussion in 'ASP General' started by JV, Mar 22, 2005.

  1. JV

    JV Guest

    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
     
    JV, Mar 22, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. M-One
    Replies:
    43
    Views:
    1,552
    Mark McIntyre
    Jul 16, 2003
  2. Phil C.
    Replies:
    3
    Views:
    270
    Joe Kaplan \(MVP - ADSI\)
    Feb 25, 2005
  3. Piet
    Replies:
    2
    Views:
    123
  4. Piet
    Replies:
    2
    Views:
    116
    Paul Lalli
    Sep 29, 2004
  5. Ana Dionísio

    Excel column 256 limit

    Ana Dionísio, Mar 18, 2013, in forum: Python
    Replies:
    14
    Views:
    276
Loading...

Share This Page