W
weizi
Hello every one
I want to get the record from excel with ASP file. Who does develop it?
I use Microsoft Excel Driver (*.xls) to implement it, but I meet a
servious problem.
When the column include "8888-9999999", the program cant' get the
record. If I remove the "-" and change the column to "88889999999" , I can
display the record. Why?
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
I want to get the record from excel with ASP file. Who does develop it?
I use Microsoft Excel Driver (*.xls) to implement it, but I meet a
servious problem.
When the column include "8888-9999999", the program cant' get the
record. If I remove the "-" and change the column to "88889999999" , I can
display the record. Why?
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