Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
merge multiple worksheets from multiple excel files into oneworksheet | Excel Discussion (Misc queries) | |||
Querying multiple Product Codes in one field using SUMPRODUCT() | New Users to Excel | |||
Querying 2 Excel files | Excel Worksheet Functions | |||
Querying host of excel files stored monthwise through VB 6.0 interface and programming | Excel Programming | |||
querying text files with sql | Excel Programming |