ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Export very slow (https://www.excelbanter.com/excel-programming/377933-export-very-slow.html)

Hank Youngerman

Export very slow
 
I have a program that does some moderately serious data manipulation.
Within the code, it reads 3000 lines from a worksheet, summarizes them
into 6 columns, sorts on one of the columns, then populates a text box
with formatted output. This all takes 2-3 seconds.

I then have a simple routine that basically says:

With worksheet("Sheet1")
for i=1 to 600
for j=1 to 6
.cells(i,j)=array(i,j)
next j
next i
end with
end sub

This routine alone takes almost 2 minutes.

Is there a faster way? Seems horribly slow to just fill about 3600
cells with already-calculated values.


Tom Ogilvy

Export very slow
 
With worksheet("Sheet1")
.cells(1,j).Resize(600,6)=array
end with
end sub

should be faster.

--
Regards,
Tom Ogilvy


"Hank Youngerman" wrote:

I have a program that does some moderately serious data manipulation.
Within the code, it reads 3000 lines from a worksheet, summarizes them
into 6 columns, sorts on one of the columns, then populates a text box
with formatted output. This all takes 2-3 seconds.

I then have a simple routine that basically says:

With worksheet("Sheet1")
for i=1 to 600
for j=1 to 6
.cells(i,j)=array(i,j)
next j
next i
end with
end sub

This routine alone takes almost 2 minutes.

Is there a faster way? Seems horribly slow to just fill about 3600
cells with already-calculated values.




All times are GMT +1. The time now is 11:00 AM.

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