asp excel

Discussion in 'ASP General' started by magix, Mar 23, 2007.

  1. magix

    magix Guest

    I try to use asp to extract excel data. if the item field in excel is empty,
    can I use "" to represent empty ?

    will this (" ") work ?
    rs("Item") = ""

    rs.open "SELECT * FROM [Sheet1$]", oConn
    do until rs.EOF
    if rs("Item") = "" then
    emptyfield = true
    else
    emptyfield = FALSE
    end if
    rs.movenext
    Loop
    magix, Mar 23, 2007
    #1
    1. Advertising

  2. Without making a connection and testing it, I would think yes.

    if not try Trim(rs("Item")) = ""
    or even Trim(Cstr(rs("Item"))) = ""

    or maybe rs("Item") = null



    --
    Dim Alan as ThatsIT.net.au.Staffmember
    Alan.signature = "Thank You"
    Response.Write Alan.signature.toString()
    __________________________________________

    "magix" <> wrote in message
    news:46043574$...
    >I try to use asp to extract excel data. if the item field in excel is
    >empty, can I use "" to represent empty ?
    >
    > will this (" ") work ?
    > rs("Item") = ""
    >
    > rs.open "SELECT * FROM [Sheet1$]", oConn
    > do until rs.EOF
    > if rs("Item") = "" then
    > emptyfield = true
    > else
    > emptyfield = FALSE
    > end if
    > rs.movenext
    > Loop
    >
    ThatsIT.net.au, Mar 24, 2007
    #2
    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. Anonieko
    Replies:
    2
    Views:
    7,291
    JackStraw73
    Feb 12, 2008
  2. Robbe Morris [C# MVP]

    asp.net extracting excel charts from an Excel file

    Robbe Morris [C# MVP], Dec 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    463
    Robbe Morris [C# MVP]
    Dec 15, 2006
  3. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,481
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  4. Grey
    Replies:
    4
    Views:
    1,936
    Mark Rae [MVP]
    Oct 17, 2007
  5. fniles
    Replies:
    6
    Views:
    630
    Karl E. Peterson
    Apr 27, 2009
Loading...

Share This Page