Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default fastest way to read a large spreadsheet

I'm writing a web app which needs to be able to read large excel files
(~10k-100k rows) as quickly as possible. I could use the built-in
Excel interop, but I'm concerned about speed. Would it be better to
buy a 3rd-party library for this?

If so, are there any recommendations? Is there a market leader? The
product needs to provide c# bindings.

TIA,
Gabe
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default fastest way to read a large spreadsheet

I would like to know what your mean by READ? Just values?

The 1st method is to copy areas from one worksheet to anther. Excel macros
are optimized to perform area copies quickly and efficiently. The problem is
they may use a lot of PC resources such as memory.

A 2nd method is to randomly access data using rows and columns. It is
slower to access excel spreadsheets by selecting rows and columns but this
method will use less resources.

A third option is to read the files without opening the files using ADO or
ODBC methods. This will use less resources. Basically you are opening up
the workbooks as Access Databases and then using Access macro instructions
from inside Excel VBA. If your data is all in one worksheet (a worksheet in
Access is a table) you can get the tabgle in one instruction.

A fourth option is to perform a query on the workbooks.

I'm not sure which option is going to be the fastest. I suspect the 3rd or
4th option. The problem on PC's to to request memory from the operating
system. When excel needs more memory is must get the extra memory from the
operating system which takes time. This is often is the cause for a program
to run slow. If there isn't available memory the Operating system performs
memory swaps saving blocks of memory temporarily on a hard drive. These
memory swaps significantly slows the PC down. The Real solution is to add
more memory to speed up your programs.

"Gabe Moothart" wrote:

I'm writing a web app which needs to be able to read large excel files
(~10k-100k rows) as quickly as possible. I could use the built-in
Excel interop, but I'm concerned about speed. Would it be better to
buy a 3rd-party library for this?

If so, are there any recommendations? Is there a market leader? The
product needs to provide c# bindings.

TIA,
Gabe

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default fastest way to read a large spreadsheet

Joel,
I'll be looping through the worksheet, reading the values of certain
columns in each row.

Regarding the ADO.net method - does that require Excel to be
installed?

TIA,
Gabe



On Jan 27, 4:23*am, Joel wrote:
I would like to know what your mean by READ? Just values?

The 1st method is to copy areas from one worksheet to anther. *Excel macros
are optimized to perform area copies quickly and efficiently. *The problem is
they may use a lot of PC resources such as memory. *

A 2nd method is to randomly access data using rows and columns. *It is
slower to access excel spreadsheets by selecting rows and columns but this
method will use less resources.

A third option is to read the files without opening the files using ADO or
ODBC methods. * This will use less resources. *Basically you are opening up
the workbooks as Access Databases and then using Access macro instructions
from inside Excel VBA. *If your data is all in one worksheet (a worksheet in
Access is a table) you can get the tabgle in one instruction.

A fourth option is to perform a query on the workbooks.

I'm not sure which option is going to be the fastest. *I suspect the 3rd or
4th option. *The problem on PC's to to request memory from the operating
system. *When excel needs more memory is must get the extra memory from the
operating system which takes time. *This is often is the cause for a program
to run slow. *If there isn't available memory the Operating system performs
memory swaps saving blocks of memory temporarily on a hard drive. *These
memory swaps significantly slows the PC down. *The Real solution is to add
more memory to speed up your programs.

"Gabe Moothart" wrote:
I'm writing a web app which needs to be able to read large excel files
(~10k-100k rows) as quickly as possible. I could use the built-in
Excel interop, but I'm concerned about speed. Would it be better to
buy a 3rd-party library for this?


If so, are there any recommendations? Is there a market leader? The
product needs to provide c# bindings.


TIA,
Gabe


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default fastest way to read a large spreadsheet

What language are you programming in? If you are using C language or VB6
they have built in libraries to work with spreadsheets and don't need excel
installed. Other languages also have built in excel libraries.

I wasn't referering specifically to ADO.net. From Excel you can use the ADO
library to access data.

"Gabe Moothart" wrote:

Joel,
I'll be looping through the worksheet, reading the values of certain
columns in each row.

Regarding the ADO.net method - does that require Excel to be
installed?

TIA,
Gabe



On Jan 27, 4:23 am, Joel wrote:
I would like to know what your mean by READ? Just values?

The 1st method is to copy areas from one worksheet to anther. Excel macros
are optimized to perform area copies quickly and efficiently. The problem is
they may use a lot of PC resources such as memory.

A 2nd method is to randomly access data using rows and columns. It is
slower to access excel spreadsheets by selecting rows and columns but this
method will use less resources.

A third option is to read the files without opening the files using ADO or
ODBC methods. This will use less resources. Basically you are opening up
the workbooks as Access Databases and then using Access macro instructions
from inside Excel VBA. If your data is all in one worksheet (a worksheet in
Access is a table) you can get the tabgle in one instruction.

A fourth option is to perform a query on the workbooks.

I'm not sure which option is going to be the fastest. I suspect the 3rd or
4th option. The problem on PC's to to request memory from the operating
system. When excel needs more memory is must get the extra memory from the
operating system which takes time. This is often is the cause for a program
to run slow. If there isn't available memory the Operating system performs
memory swaps saving blocks of memory temporarily on a hard drive. These
memory swaps significantly slows the PC down. The Real solution is to add
more memory to speed up your programs.

"Gabe Moothart" wrote:
I'm writing a web app which needs to be able to read large excel files
(~10k-100k rows) as quickly as possible. I could use the built-in
Excel interop, but I'm concerned about speed. Would it be better to
buy a 3rd-party library for this?


If so, are there any recommendations? Is there a market leader? The
product needs to provide c# bindings.


TIA,
Gabe



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
Fastest way to select large range (e.g. B3:F1002)? [email protected] Excel Discussion (Misc queries) 7 August 31st 07 04:36 PM
Fastest reading of large text files hmm Excel Programming 5 November 23rd 06 07:51 PM
Fastest way to sort large 2-D arrays? RB Smissaert Excel Programming 21 January 10th 05 07:12 PM
REad large txt files banavas[_11_] Excel Programming 3 June 25th 04 06:57 AM
Need FASTEST way to get data from a large closed Excel File Dave B[_5_] Excel Programming 13 October 29th 03 09:26 PM


All times are GMT +1. The time now is 04:15 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"