public void SetTable(int sheetIndex, IExcelTable table) { if (table != null) { this._workbook.Worksheets[sheetIndex].SetSheetTable(table); } }
/// <summary> /// Add a sheet table to the current worksheet. /// </summary> /// <param name="table">An <see cref="T:Dt.Xls.IExcelTable" /> instance describe a table settings.</param> public void SetSheetTable(IExcelTable table) { if (this._tables == null) { this._tables = new List <IExcelTable>(); } this._tables.Add(table); }
public void SetTableData(DataTable table, string tableTitle = "") { this.Table = Excel.CreateTable(table, tableTitle); this.Table.SetColumnWidths(new short[] { 17, 17, 16, 15, 17, 25 }); }