asp excel

asp excel

am 23.03.2007 21:15:46 von magix

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

Re: asp excel

am 24.03.2007 15:39:45 von me

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$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
>