Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Q Q is offline
external usenet poster
 
Posts: 25
Default Querying multiple Excel files

We have a few hundred Excel files, whose structure is the same: a one page
numeric data worksheet and a few graphs. We like to extract some numeric
data out of some of these files.

A colleague has written an Excel macro to do it, and he commented that it is
slow as it takes a min or two in each run. And he needs to run it multiple
times. I read somewhere before that we can query an Excel file. I saw an
example for querying one file. I wonder would it be possible and practical
to query multiple Excel files?

Or any idea on how best to extract data in multiple Excel files?

Thnaks,

Q
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Querying multiple Excel files

If you have a few hundred workbook that take ONLY two minutes to open and
close that is pretty good. Thats a 1/2 second a file.

When you say querying I think you mean accessing the files without opening
the files. These are done with database instructtions not a query. You
would create an Access Object and usingg Access Macro instructions (inside
excel) read the data. It is a little bit harder to get the data in this
fashion because in Access you have to move down X number of rows and then
move Y number of columns to get the data. In Excel you can randomly move to
any cells. I'm not sure how much improvement you will really get because you
will still havve to connect to each file.

"Q" wrote:

We have a few hundred Excel files, whose structure is the same: a one page
numeric data worksheet and a few graphs. We like to extract some numeric
data out of some of these files.

A colleague has written an Excel macro to do it, and he commented that it is
slow as it takes a min or two in each run. And he needs to run it multiple
times. I read somewhere before that we can query an Excel file. I saw an
example for querying one file. I wonder would it be possible and practical
to query multiple Excel files?

Or any idea on how best to extract data in multiple Excel files?

Thnaks,

Q

  #3   Report Post  
Posted to microsoft.public.excel.programming
Q Q is offline
external usenet poster
 
Posts: 25
Default Querying multiple Excel files

Joel

Thanks for your reply. Two mins is for reading and processing only a subset
of the files out of the hundreds.

Q

"Joel" wrote:

If you have a few hundred workbook that take ONLY two minutes to open and
close that is pretty good. Thats a 1/2 second a file.

When you say querying I think you mean accessing the files without opening
the files. These are done with database instructtions not a query. You
would create an Access Object and usingg Access Macro instructions (inside
excel) read the data. It is a little bit harder to get the data in this
fashion because in Access you have to move down X number of rows and then
move Y number of columns to get the data. In Excel you can randomly move to
any cells. I'm not sure how much improvement you will really get because you
will still havve to connect to each file.

"Q" wrote:

We have a few hundred Excel files, whose structure is the same: a one page
numeric data worksheet and a few graphs. We like to extract some numeric
data out of some of these files.

A colleague has written an Excel macro to do it, and he commented that it is
slow as it takes a min or two in each run. And he needs to run it multiple
times. I read somewhere before that we can query an Excel file. I saw an
example for querying one file. I wonder would it be possible and practical
to query multiple Excel files?

Or any idea on how best to extract data in multiple Excel files?

Thnaks,

Q

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Querying multiple Excel files

Hi Q

See how fast this is
http://www.rondebruin.nl/merge.htm

There is code also on my site

You can try ADO also (you not open the files then)
http://www.rondebruin.nl/ado.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Q" wrote in message ...
We have a few hundred Excel files, whose structure is the same: a one page
numeric data worksheet and a few graphs. We like to extract some numeric
data out of some of these files.

A colleague has written an Excel macro to do it, and he commented that it is
slow as it takes a min or two in each run. And he needs to run it multiple
times. I read somewhere before that we can query an Excel file. I saw an
example for querying one file. I wonder would it be possible and practical
to query multiple Excel files?

Or any idea on how best to extract data in multiple Excel files?

Thnaks,

Q

  #5   Report Post  
Posted to microsoft.public.excel.programming
Q Q is offline
external usenet poster
 
Posts: 25
Default Querying multiple Excel files

Thanks Ron de Bruin. Somehow, it does not work for me. The .xla setup was
fine, but somehow, it gave me an error when trying to merge the data.

My colleague who needs this came by, and we found a solution. He has a
macro that further processes those Excel files that are generated by my
program. If I incorporate his code to my program, then we are good.

Thanks again,

Q

"Ron de Bruin" wrote:

Hi Q

See how fast this is
http://www.rondebruin.nl/merge.htm

There is code also on my site

You can try ADO also (you not open the files then)
http://www.rondebruin.nl/ado.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Q" wrote in message ...
We have a few hundred Excel files, whose structure is the same: a one page
numeric data worksheet and a few graphs. We like to extract some numeric
data out of some of these files.

A colleague has written an Excel macro to do it, and he commented that it is
slow as it takes a min or two in each run. And he needs to run it multiple
times. I read somewhere before that we can query an Excel file. I saw an
example for querying one file. I wonder would it be possible and practical
to query multiple Excel files?

Or any idea on how best to extract data in multiple Excel files?

Thnaks,

Q




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Querying multiple Excel files

On 14 Sty, 02:08, Q wrote:
We have a few hundredExcelfiles, whose structure is the same: a one page
numeric data worksheet and a few graphs. *We like to extract some numeric
data out of some of these files.

A colleague has written anExcelmacro to do it, and he commented that it is
slow as it takes a min or two in each run. *And he needs to run it multiple
times. *I read somewhere before that we can query anExcelfile. *I saw an
example for querying one file. *I wonder would it be possible and practical
to query multipleExcelfiles?

Or any idea on how best to extract data in multipleExcelfiles?

Thnaks,

Q


www.afin.net/AFIN.NET.Light
or contact me for more info
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
merge multiple worksheets from multiple excel files into oneworksheet Shamoun Ilyas Excel Discussion (Misc queries) 5 November 19th 08 09:48 PM
Querying multiple Product Codes in one field using SUMPRODUCT() Tan New Users to Excel 2 April 15th 07 06:36 PM
Querying 2 Excel files J-Unit Excel Worksheet Functions 1 April 24th 06 05:44 PM
Querying host of excel files stored monthwise through VB 6.0 interface and programming [email protected] Excel Programming 0 November 17th 05 08:13 AM
querying text files with sql RB Smissaert Excel Programming 1 September 2nd 03 01:07 AM


All times are GMT +1. The time now is 05:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"