|
Home > Archive > IIS ASP > March 2007 > asp excel
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| 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 2007-03-24, 1:17 pm |
| 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" <magix@asia.com> wrote in message
news:46043574$1_1@news.tm.net.my...
>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
>
|
|
|
|
|