Dynamic Excel Queries

ReAn

Dangerous Programmer...
Local time
Yesterday, 17:55
Joined
Jun 25, 2004
Messages
250
I've got a database that I need to import a vacation days table from an excel sheet. The biggest deal with it all is that the excel file & range it needs to search for the data is dynamic, actually I also need to be able to scan different sheets within the excel file.

Now, im not new to all this stuff, ive done all sorts of complicated excel manipulation in VBA as well as queries and custom processing, but I've been away from it all for roughly 8 mo. so im rusty.

If anyone has a suggestion about how i could go about loading the excel file (dynamically) and pulling information from it (i will be doing aggrigates like SUM & Count, however i can program these manually if need be.)

Thanks

-ReAn
 
You will have to open up the spreadsheet with VBA and search for the data in the cells.

Dim xlApp as Excel.Application
Dim xlWrkBk as Excel.Workbook
Dim xlSheet as Excel.Worksheet

Set xlApp = CreateObject ("Excel.Application")

set xlWrkBk=getObject ("PathToFile")
set xlSheet= xlWrkBk.worksheet(1)
 
KeithG said:
You will have to open up the spreadsheet with VBA and search for the data in the cells.

Dim xlApp as Excel.Application
Dim xlWrkBk as Excel.Workbook
Dim xlSheet as Excel.Worksheet

Set xlApp = CreateObject ("Excel.Application")

set xlWrkBk=getObject ("PathToFile")
set xlSheet= xlWrkBk.worksheet(1)

Thankyou, that's what I was thinking, has hoping it'd be easier, oh well.
 

Users who are viewing this thread

Back
Top Bottom