Posted 17 August 2020, 9:23 am EST
Hello,
I have a spreadsheet which can have ‘N’ number of rows and upto 15 columns.
Right now We are populating the data into spreadsheet 1 cell at a time as follows:
ActiveSheet.SetActiveCell(0,0) ;
ActiveSheet.ActiveCell.ForeColor = SystemColors.GrayText;
ActiveSheet.ActiveCell.Text = “some text”;
And this continues in a while loop for all cells in the spreadsheet until the entire data is populated.
But now, i want to populate 1 row at a time to get better spreadsheet performance.
I am willing to try the following approach, select the active row and then fill the data as:
ActiveSheet.ColumnCount = 15;
ActiveSheet.AddSelection(lCurRow, 0, 1, ActiveSheet.ColumnCount);
and then somehow try to fill the entire row with data in 1 go inside a for loop for all rows.
But how can we fill the complete data at one go in the row and not set cell by cell???
Thanks,