Click here to Skip to main content
16,005,120 members
Home / Discussions / C#
   

C#

 
AnswerRe: Binding data to Listview Pin
RepliCrux12-Jul-07 19:00
RepliCrux12-Jul-07 19:00 
QuestionSynchronize SQL and Access in .NET 2005 Pin
Elizma12-Jul-07 18:11
Elizma12-Jul-07 18:11 
AnswerRe: Synchronize SQL and Access in .NET 2005 Pin
Paul Conrad12-Jul-07 18:21
professionalPaul Conrad12-Jul-07 18:21 
GeneralRe: Synchronize SQL and Access in .NET 2005 Pin
Elizma12-Jul-07 18:27
Elizma12-Jul-07 18:27 
GeneralRe: Synchronize SQL and Access in .NET 2005 Pin
Paul Conrad12-Jul-07 18:47
professionalPaul Conrad12-Jul-07 18:47 
QuestionQuick way to add 1D array to Multidimensional array Pin
RYU^^12-Jul-07 17:30
RYU^^12-Jul-07 17:30 
AnswerRe: Quick way to add 1D array to Multidimensional array Pin
Elizma12-Jul-07 18:07
Elizma12-Jul-07 18:07 
GeneralRe: Quick way to add 1D array to Multidimensional array Pin
RYU^^12-Jul-07 21:45
RYU^^12-Jul-07 21:45 
Hi Elizma,

Yes, I am indeed exporting DataTable to Excel.
Doing loop for each row and each column will be quick if the number of columns aren't big. Here, I am talking about about 1000+ rows by 1000+ columns.

Currently, if I do
for (int iRow = 0; iRow < dt.Rows.Count; iRow++)
{
   oRng = oSht.get_Range("A" + iRow.ToString(), strLastCol + iRow.ToString());
   oRng.Value2 = (System.Array)dt.Rows[iRow].ItemArray;
}

This code is about 30x faster than nested loop. In my PC this loop takes about 20 seconds where as nested loop (to set each cell) takes about 10 minutes.

However, if you set directly to MultiDimensional Array, it takes less than 1 second (and probably few seconds to add the 1D array into Multidimensional array).

I am starting to think that it is impossible to add 1D array to Multidimensional array without nested loop Frown | :(

Any other idea to speed up this process? Thanks for any input/help.

Cheers Smile | :)
AnswerRe: Quick way to add 1D array to Multidimensional array Pin
Sathesh Sakthivel12-Jul-07 18:09
Sathesh Sakthivel12-Jul-07 18:09 
GeneralRe: Quick way to add 1D array to Multidimensional array Pin
RYU^^12-Jul-07 21:46
RYU^^12-Jul-07 21:46 
GeneralRe: Quick way to add 1D array to Multidimensional array Pin
J4amieC12-Jul-07 23:57
J4amieC12-Jul-07 23:57 
QuestionWindows Media Player 11 Repeat??? Pin
Small Rat12-Jul-07 11:50
Small Rat12-Jul-07 11:50 
Questionreading data from serial port and graph it Pin
ahmad al-omar12-Jul-07 9:35
ahmad al-omar12-Jul-07 9:35 
AnswerRe: reading data from serial port and graph it Pin
PhilDanger12-Jul-07 10:23
PhilDanger12-Jul-07 10:23 
GeneralRe: reading data from serial port and graph it Pin
ahmad al-omar13-Jul-07 10:01
ahmad al-omar13-Jul-07 10:01 
AnswerRe: reading data from serial port and graph it Pin
Ed.Poore12-Jul-07 12:02
Ed.Poore12-Jul-07 12:02 
GeneralRe: reading data from serial port and graph it Pin
ahmad al-omar13-Jul-07 10:05
ahmad al-omar13-Jul-07 10:05 
GeneralRe: reading data from serial port and graph it Pin
Ed.Poore13-Jul-07 12:09
Ed.Poore13-Jul-07 12:09 
QuestionRemoting problem Pin
Wjousts12-Jul-07 9:30
Wjousts12-Jul-07 9:30 
AnswerRe: Remoting problem Pin
Larantz12-Jul-07 11:46
Larantz12-Jul-07 11:46 
GeneralRe: Remoting problem Pin
Wjousts13-Jul-07 2:05
Wjousts13-Jul-07 2:05 
GeneralRe: Remoting problem Pin
Larantz13-Jul-07 23:05
Larantz13-Jul-07 23:05 
Question.Net 3 Pin
mehrdadc4812-Jul-07 9:24
mehrdadc4812-Jul-07 9:24 
AnswerRe: .Net 3 Pin
Zoltan Balazs12-Jul-07 9:29
Zoltan Balazs12-Jul-07 9:29 
GeneralRe: .Net 3 Pin
sidbaruah12-Jul-07 19:55
sidbaruah12-Jul-07 19:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.