LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Efficient Code to Copy a 1-D Array to a Worksheet Column

If I were doing this in VBA I would try both ways with a timer to see
which performance hit was worse.


.... and if it didn't matter much, I'd use WorksheetFunction.Transpose,
because I'm basically lazy.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Jon Peltier" wrote in message
...
Choose your inefficiency:

(a) Invoke WorksheetFunction.Transpose(MyArray) [I don't know how you
would do it in C#; that's your problem]

(b) Create and populate a 2D array from the 1D array.

If I were doing this in VBA I would try both ways with a timer to see
which performance hit was worse.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"R.E." wrote in message
...
Correction on my typo: Copying the data from the 1D array into a 2D array
does work, but adds inefficiency due to the extra copy step. I'd like a
more
efficient way. My app is going to be slow enough for the large arrays I
have, without adding an extra copy step.







 
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
Copy & Paste code more efficient Desert Piranha[_102_] Excel Programming 12 August 16th 06 04:51 AM
Efficient Array Formula Construction Mike Moore Excel Discussion (Misc queries) 8 July 24th 06 12:37 AM
Efficient Code GregR Excel Programming 7 June 27th 05 04:09 PM
More Efficient code than this thom hoyle Excel Programming 14 May 11th 05 07:40 AM
More efficient code Rob Bovey Excel Programming 1 July 9th 03 04:46 AM


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

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"