I am creating an Excel 2007 workbook with 10,000 rows and 20 columns. When I first start assigning values to cell it takes about 8 - 10 ms to to assign the 20 columns for each row.
After adding 100 rows it then takes about 13 - 15 ms to assign the 20 columns.
After 500 rows it then takes about 25ms to assign the 20 columns.
After 2000 rows it then takes 80ms to assign the 20 columns.
After 5000 rows it then takes about 200ms to assign the 20 columns.
After 7000 rows it takes about 260ms to assign the 20 columns.
After 8000 rows it takes about 300ms to assign the 20 columns.
After 9000 rows it takes about 350ms to assign the 20 columns.
At 10000 rows it is taking about 400ms to assign the 20 columns.
Is this correct behavior? As the workbook grows it takes longer and longer to assign values to cells?
We are using version 9.2.20092.2119
Thanks for the info...I will do so.
No there is currently no way to do that. You can submit a feature request for this.
Mike,
Is there an efficient way to put a box around a range of cells? I was creating 4 CellFormats and then applying the appropriate one to the cell with SetFormatting. However, this increased the time to create the worksheet by 12 times. I looked into a Range but the control does not support that. I looked at the WorksheetRegion but that only appears to allow us to set a formula. Basically, I want to put a box around a group of cells. They all happen to be in the same column.
oWorksheetCell:CellFormat:SetFormatting(oCellformat4)
/* create our cellformat we will use for borders */
oCellFormat1 = oWorkbook:CreateNewWorksheetCellFormat().
oCellFormat1:LeftBorderStyle = CellBorderLineStyle:Double
oCellFormat1:RightBorderStyle = CellBorderLineStyle:
DOUBLE.
oCellFormat2 = oWorkbook:CreateNewWorksheetCellFormat().
oCellFormat2:LeftBorderStyle = CellBorderLineStyle:Double
oCellFormat2:RightBorderStyle = CellBorderLineStyle:
DOUBLE
oCellformat2:TopBorderStyle = CellBorderLineStyle:
oCellFormat3 = oWorkbook:CreateNewWorksheetCellFormat().
oCellFormat3:LeftBorderStyle = CellBorderLineStyle:Double
oCellFormat3:RightBorderStyle = CellBorderLineStyle:
oCellformat3:BottomBorderStyle = CellBorderLineStyle:
oCellFormat4 = oWorkbook:CreateNewWorksheetCellFormat().
oCellFormat4:LeftBorderStyle = CellBorderLineStyle:Double
oCellFormat4:RightBorderStyle = CellBorderLineStyle:
oCellformat4:BottomBorderStyle = CellBorderLineStyle:
I just tried that and it did make a difference.
Thanks for the tip.
I did not but will.
Thanks.