ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to open many excel files efficiently (https://www.excelbanter.com/excel-programming/364916-how-open-many-excel-files-efficiently.html)

xs

How to open many excel files efficiently
 
Hi,

I tried opening 50+ files using the Open method at theWorkbook class at one
go. However due to the size of each file, which average about 2 MB, the
process takes too long to open. Is there a more efficient way to open these
files? Because each file takes about 5 mins to process and open. I have
tried opening a file, process it and closing it. But it doesn't make any
difference. Is there a way to open 1 excel process and use that process to
open the rest of the excel files? That should be the best way to open and
process them right?

Regards
xs



xs

How to open many excel files efficiently
 
Sorry I forgot to mention that I am using C# to open them.
Thanks.
"xs" wrote in message
...
Hi,

I tried opening 50+ files using the Open method at theWorkbook class at
one go. However due to the size of each file, which average about 2 MB,
the process takes too long to open. Is there a more efficient way to open
these files? Because each file takes about 5 mins to process and open. I
have tried opening a file, process it and closing it. But it doesn't make
any difference. Is there a way to open 1 excel process and use that
process to open the rest of the excel files? That should be the best way
to open and process them right?

Regards
xs




Chris

How to open many excel files efficiently
 
Hi xs,

It looks like ADO is going to be faster.

I found something that might help: http://snipurl.com/OpenExcelFiles Here it
shows ADO being used to access all the Excel files in a directory and
subdirectories.

Also see:

How To Use ADO with Excel Data from Visual Basic or VBA This article
discusses the use of ActiveX Data Objects (ADO) with Microsoft Excel
spreadsheets as a data source. The article also highlights syntax issues ...
http://support.microsoft.com/kb/257819

Hope this information helps,

Chris

"xs" wrote in message
...
Hi,

I tried opening 50+ files using the Open method at theWorkbook class at
one go. However due to the size of each file, which average about 2 MB,
the process takes too long to open. Is there a more efficient way to open
these files? Because each file takes about 5 mins to process and open. I
have tried opening a file, process it and closing it. But it doesn't make
any difference. Is there a way to open 1 excel process and use that
process to open the rest of the excel files? That should be the best way
to open and process them right?

Regards
xs




Chris

How to open many excel files efficiently
 
Hi xs,

Here is an article, with source code, in C#

http://www.c-sharpcorner.com/Code/20...essExcelDb.asp

Best regards,

Chris

"Chris" wrote in message
...
Hi xs,

It looks like ADO is going to be faster.

I found something that might help: http://snipurl.com/OpenExcelFiles Here
it shows ADO being used to access all the Excel files in a directory and
subdirectories.

Also see:

How To Use ADO with Excel Data from Visual Basic or VBA This article
discusses the use of ActiveX Data Objects (ADO) with Microsoft Excel
spreadsheets as a data source. The article also highlights syntax issues
...
http://support.microsoft.com/kb/257819

Hope this information helps,

Chris

"xs" wrote in message
...
Hi,

I tried opening 50+ files using the Open method at theWorkbook class at
one go. However due to the size of each file, which average about 2 MB,
the process takes too long to open. Is there a more efficient way to open
these files? Because each file takes about 5 mins to process and open. I
have tried opening a file, process it and closing it. But it doesn't make
any difference. Is there a way to open 1 excel process and use that
process to open the rest of the excel files? That should be the best way
to open and process them right?

Regards
xs






xs

How to open many excel files efficiently
 
Thanks...I will try it immediately

"Chris" wrote in message
...
Hi xs,

Here is an article, with source code, in C#

http://www.c-sharpcorner.com/Code/20...essExcelDb.asp

Best regards,

Chris

"Chris" wrote in message
...
Hi xs,

It looks like ADO is going to be faster.

I found something that might help: http://snipurl.com/OpenExcelFiles Here
it shows ADO being used to access all the Excel files in a directory and
subdirectories.

Also see:

How To Use ADO with Excel Data from Visual Basic or VBA This article
discusses the use of ActiveX Data Objects (ADO) with Microsoft Excel
spreadsheets as a data source. The article also highlights syntax issues
...
http://support.microsoft.com/kb/257819

Hope this information helps,

Chris

"xs" wrote in message
...
Hi,

I tried opening 50+ files using the Open method at theWorkbook class at
one go. However due to the size of each file, which average about 2 MB,
the process takes too long to open. Is there a more efficient way to
open these files? Because each file takes about 5 mins to process and
open. I have tried opening a file, process it and closing it. But it
doesn't make any difference. Is there a way to open 1 excel process and
use that process to open the rest of the excel files? That should be the
best way to open and process them right?

Regards
xs









All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com