cancel
Showing results for 
Search instead for 
Did you mean: 

OLEDB Collection

FatimaAlcaraz
Level 4
- Execution of an SQL statement in OLEDB to get the data in a Collection.
           SELECT * FROM [Sheet1$]
I must obtain the data from an excel file and I am using the OLEDB object, which brings me all the rows of the sheet.
But in my case, I need to get the data starting from row A9, since I won't need the rest. Is there a way that in the query I can modify which row I want to get the collection from or not?
Kind of like a range or something like that.

------------------------------
Fatima Alcaraz
------------------------------
1 REPLY 1

PabloSarabia
Level 11
Hi, 

You can try to make this in you SELECT statement:

SELECT * FROM [Sheet1$A9:XX]

Just putting the row in the from works (Also replace XX for your final column letter). But... take care cause if you don't have the header in the row A9 you will get as header the data that you have in this row.

Hope this helps you, and if this solves your problem remember mark the reply as best answer 🙂



Bye 🙂

------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
634726270
------------------------------