public static void InsertDataTable(this ISheet ISheet1, DataTable dataTable, int startRow, int startColumn, bool showHeader, bool autoWidth) { if (showHeader) { ISheet1.AddTableHeader(dataTable, ref startRow, startColumn); } ISheet1.AddTableBody(dataTable, startRow, startColumn); if (autoWidth) { ISheet1.AutoSizeColumn(dataTable.Columns.Count, startColumn); } }