Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Population an Excel Range with an array
Message
From
07/07/2013 04:03:59
 
 
To
06/07/2013 17:31:05
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01577886
Message ID:
01577910
Views:
62
Bill,

Just for comparison I created an array of 10,000 rows and 4 columns and filled it with numeric data. The paste into Excel takes 0.06 seconds.

If I fill the array with strings of 15 characters in length then the paste operation into Excel takes 0.1 seconds.

With 2500 rows x 4 columns the paste operation takes 0.03 seconds using numeric fields and 0.05 seconds using character fields.


>For everyone's information:
>Filling a 4 column worksheet with 2500 rows from a dbf one cell at a time takes about 3 seconds on a pretty fast machine. That was a problem for me since the app in question might have a lot more volume than that at times and that's why I started looking around.
>Using the array method with the same data, it's instantaneous.
>Further, MS advises that the Excel interop engine has a 64K space for range references and since each cell fill uses a new range reference, filling a speadsheet with high volumes of data a cell at a time might destabilize the engine.
>No such problem with the array method
>
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform