I only ask cause of the speed difference in doing it this way and doing it directly in the access program itself. For example, if you go into the access database and run the query, and then export the results with excel, it does it in about 10 seconds compared to the 5+ mins it takes with the code below:

DataTable dt = new DataTable(); dt = dsMain.Tables["Bills"]; Excel.Application excel = new Excel.Application(); Excel.Workbook workbook = excel.Application.Workbooks.Add(true); // Add column headings... int iCol = 0; foreach (DataColumn c in dt.Columns) { iCol++; excel.Cells[1, iCol] = c.ColumnName; } // for each row of data... int iRow = 0; foreach (DataRow r in dt.Rows) { iRow++; // add each row's cell data... iCol = 0; foreach (DataColumn c in dt.Columns) { iCol++; excel.Cells[iRow + 1, iCol] = r[c.ColumnName]; } } // Global missing reference for objects we are not defining... object missing = System.Reflection.Missing.Value; // If wanting to Save the workbook... workbook.SaveAs("MyExcelWorkBook.xlsx", Excel.XlFileFormat.xlXMLSpreadsheet, missing, missing, false, false, Excel.XlSaveAsAccessMode.xlNoChange, missing, missing, missing, missing, missing); // If wanting to make Excel visible and activate the worksheet... excel.Visible = true; Excel.Worksheet worksheet = (Excel.Worksheet)excel.ActiveSheet; ((Excel._Worksheet)worksheet).Activate(); // If wanting excel to shutdown... ((Excel._Application)excel).Quit(); MessageBox.Show("Completed!", "Export");