User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 456,233 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,767 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 1611 | Replies: 1
Reply
Join Date: Oct 2007
Posts: 10
Reputation: Pareshja is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Pareshja Pareshja is offline Offline
Newbie Poster

Reading excel sheet into a recordset

  #1  
Nov 8th, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: Reading excel sheet into a recordset

  #2  
Nov 8th, 2007
Please check the column format of that excel file. Set it to text.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 5:06 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC