Fastest way to drop a DataSet into a worksheet
问题 A rather higeisch dataset with 16000 x 12 entries needs to be dumped into a worksheet. I use the following function now: for (int r = 0; r < dt.Rows.Count; ++r) { for (int c = 0; c < dt.Columns.Count; ++c) { worksheet.Cells[c + 1][r + 1] = dt.Rows[r][c].ToString(); } } I rediced the example to the center piece Here is what i implemented after reading the suggestion from Dave Zych. This works great. private static void AppendWorkSheet(Excel.Workbook workbook, DataSet data, String tableName) {