BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Syntax for query-ing MS Excel data

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (ADO)
View previous topic :: View next topic  
Author Message
Vladimir Stefanovic
Guest





PostPosted: Fri Apr 13, 2007 2:04 am    Post subject: Syntax for query-ing MS Excel data Reply with quote



Hi,

I have some questions on right syntax for querying MS EXCEL data.

This syntax:
SELECT * FROM [Sheet1$]
....works fine.

But this one:
SELECT * FROM [Sheet1$A1:B3]
....doesn't (I cought an exception in try&catch).

Does anyone know how can I select only sheets in some range
(A1 to B3, for example)



--
Best Regards,
Vladimir Stefanovic
Back to top
Minas
Guest





PostPosted: Tue Apr 17, 2007 1:30 am    Post subject: Re: Syntax for query-ing MS Excel data Reply with quote



Vladimir

I think you have to give a name to the range A1:B3 (for example tbl1)
You can do that through Insert->Names Menu in Excel .
That name(range) will be viewed as table . Just format your cells
before apply(give) the name. The cells of the first line will be the
names of the fields

Best Regards

_Minas Harokopos

------
"Only the virtue's conquests have certainty" Sofokleous Erephyle

Ï "Vladimir Stefanovic" <antivari (AT) po (DOT) sbb.co.yu> wrote

Quote:

I have some questions on right syntax for querying MS EXCEL data.

This syntax:
SELECT * FROM [Sheet1$]
...works fine.

But this one:
SELECT * FROM [Sheet1$A1:B3]
...doesn't (I cought an exception in try&catch).

Does anyone know how can I select only sheets in some range
(A1 to B3, for example)
Back to top
Vladimir Stefanovic
Guest





PostPosted: Thu Apr 19, 2007 12:14 am    Post subject: Re: Syntax for query-ing MS Excel data Reply with quote



Thank you.

--
Best Regards,
Vladimir Stefanovic
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.