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 of getting data into excel

Hi Everyone

I am writing an app at the moment which has to import a large amount of data (1m + cells) into excel and am currently using the excel object model to do this. I am using the cells value property to do this i.e 'objsheet.Cells(1,1).value = x'

I have noticed that usings the cell object model seem to be very slow is there a faster way of getting the data into excel

Cheers.....Ji

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Fastest way of getting data into excel

Hi
one way:
disable screenupdating and automatic calculation at the
beginning of your macro and enable it again after
inserting your values

-----Original Message-----
Hi Everyone,

I am writing an app at the moment which has to import a

large amount of data (1m + cells) into excel and am
currently using the excel object model to do this. I am
using the cells value property to do this
i.e 'objsheet.Cells(1,1).value = x'.

I have noticed that usings the cell object model seem to

be very slow is there a faster way of getting the data
into excel?

Cheers.....Jim

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Fastest way of getting data into excel

You could create a temporary array in VBA and fill it. Then transfer
the array to a range in one statement:
DataRange.Value=TempArray
This is much faster than inserting into individual cells. Also see
Frank K's tips.

Frank Kabel wrote:
Hi
one way:
disable screenupdating and automatic calculation at the
beginning of your macro and enable it again after
inserting your values


-----Original Message-----
Hi Everyone,

I am writing an app at the moment which has to import a


large amount of data (1m + cells) into excel and am
currently using the excel object model to do this. I am
using the cells value property to do this
i.e 'objsheet.Cells(1,1).value = x'.

I have noticed that usings the cell object model seem to


be very slow is there a faster way of getting the data
into excel?

Cheers.....Jim

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Fastest way of getting data into excel

put your data into an array and transfer the array to a range

dim varr(65536,256) as variant
'
' fill array with data
'
objsheet.range("a1:IV65536")=varr

Usually it pays to transfer the information in as large a block as possible


Charles
______________________
Decision Models
FastExcel Version 2 now available.
www.DecisionModels.com/FxlV2WhatsNew.htm

"jnc" wrote in message
...
Hi Everyone,

I am writing an app at the moment which has to import a large amount of

data (1m + cells) into excel and am currently using the excel object model
to do this. I am using the cells value property to do this i.e
'objsheet.Cells(1,1).value = x'.

I have noticed that usings the cell object model seem to be very slow is

there a faster way of getting the data into excel?

Cheers.....Jim



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Fastest way of getting data into excel

Thanks everyone.....the array method seems perfect


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
seeking the fastest workflow for converting bmp image into Excel orASCII table with numbers LunaMoon Excel Discussion (Misc queries) 3 September 29th 08 06:14 AM
EXCEL, VSTO: Fastest way to access multiple cells Alan Excel Discussion (Misc queries) 1 June 1st 05 02:45 PM
What is fastest way to print labels from Excel data? Janis New Users to Excel 1 April 12th 05 10:37 PM
fastest hardware for excel N Lennox Excel Programming 2 April 12th 04 07:30 PM
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:55 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"