W
weizi
I use the ado to read the record form excel, all is right. But when I read
the phone column, I meet with a serious problem. Some of this fileds is like
999-888888888, I can't read the content. The follow is my program. How can I
do?
connstr="Driver={Microsoft Excel Driver (*.xls)};dbq=" &
server.MapPath("data\test.xls")
set conn = server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstr sql = "select * from [Sheet1$]"
rs.Open sql,conn
While rs.EOF=False
Response.Write rs.Fields("UserName") & " " & rs.Fields("Phone")
rs.MoveNext
Wend
rs.Close
the phone column, I meet with a serious problem. Some of this fileds is like
999-888888888, I can't read the content. The follow is my program. How can I
do?
connstr="Driver={Microsoft Excel Driver (*.xls)};dbq=" &
server.MapPath("data\test.xls")
set conn = server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstr sql = "select * from [Sheet1$]"
rs.Open sql,conn
While rs.EOF=False
Response.Write rs.Fields("UserName") & " " & rs.Fields("Phone")
rs.MoveNext
Wend
rs.Close