Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 19th, 2003, 11:36 AM
NGEddie NGEddie is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 3 NGEddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question VBScript/ADO/Excel - get only top left cell

I need to get the data out of the top left most cell in my excel spreadsheet using ADO.

(the cell is actually b3 - but all the others above are blank)

the problem seems to be that the top row is being imported as a header since the following returns the first cell
rsData.Fields(0).Name

and this returns the cell below (b4)
rsData.Fields(0).Value

I cant use the Name field to gat the data because the cell contains a long string and the name field is truncated at 20 characters or so... :-(

any advice greatly appreciated,

the code if its helpful
PHP Code:
 Set rsData CreateObject("ADODB.Recordset")
  
rsData.Open "SELECT * FROM [sheet1$b3:b4]"strConnectionStringadOpenStaticadLockReadOnlyadCmdText
msgbox rsData
.recordCount
  msgbox rsData
.Fields(0).Name ' shows truncated b3
  msgbox rsData.Fields(0).Value ' 
shows b4 

Reply With Quote
  #2  
Old November 20th, 2003, 04:28 AM
NGEddie NGEddie is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 3 NGEddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
no one has seen this problem before?

any help appreciated...

Eddie

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > VBScript/ADO/Excel - get only top left cell


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway