943,882 Members | Top Members by Rank

Ad:
Nov 8th, 2007
0

Reading excel sheet into a recordset

Expand Post »
Hi Guys,

I need some help. My application reads an excel file and dumps it into a recordset. The problem is that if a coloumn in excel has numbers and text in it only the numbers are dumped into the recordset and not the text values. The text values are just blank


Set rsCat = New ADODB.Recordset
Set conn = New ADODB.Connection

sqlCatExcel = "select * from [All $]"
rsCat.CursorLocation = adUseClient

rsCat.Open sqlCatExcel, "DRIVER=Microsoft Excel Driver (*.xls);Extended Properties=excel 8.0;" & "DBQ=" & filename

Set DataGrid1.DataSource = rsCat


Please help
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Pareshja is offline Offline
10 posts
since Oct 2007
Nov 8th, 2007
0

Re: Reading excel sheet into a recordset

Please check the column format of that excel file. Set it to text.
Reputation Points: 25
Solved Threads: 18
Practically a Master Poster
binoj_daniel is offline Offline
645 posts
since Dec 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Windows Media Player
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Parallel communications with Win32 API.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC