Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default A question on read the record from excel

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to have a record number change for every record Puget Sound Courier Service Excel Discussion (Misc queries) 1 July 12th 09 03:32 PM
Open new record with selected fields from previous record Design by Sue Excel Discussion (Misc queries) 1 June 12th 09 02:24 PM
Record Counting in Excel? ljh3rdid New Users to Excel 1 May 12th 06 02:56 PM
How can a file be converted from Read-Only to Read/Write Jim in Apopka Excel Discussion (Misc queries) 2 November 19th 05 04:59 PM


All times are GMT +1. The time now is 05:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"