I'm reading the contents into an array then assigning it excel range for faster export.
I successfully exported to excel when it is not grouped. However when grouped I dont get the grouping effect appearing.
Below is a snippet:
any suggestions will be appreciated.
I successfully exported to excel when it is not grouped. However when grouped I dont get the grouping effect appearing.
Below is a snippet:
foreach (GridViewColumn col in grid.Columns) { arr[0, i] = col.HeaderText; i++; } //Contents long currRow = 0; foreach (GridViewRowInfo row in grid.Rows) { int currCol=0; foreach (GridViewColumn col in grid.Columns) { if(row.Cells[currCol].Value != null ) { arr[currRow + 1, currCol] = row.Cells[currCol].Value.ToString(); } else { arr[currRow + 1, currCol] =""; } currCol ++; } currRow ++; } rng.Value2 = arr;
any suggestions will be appreciated.