protected void DoCreateDataTable(out DataTable dataTable) { var workbook = GetCmdletSpreadsheet(); var range = SpreadsheetUtils.GetWorkbookRange(workbook, TableName); dataTable = SpreadsheetUtils.GetDataTable(range); CopyRangeToBook(range); AddComments(range); }
protected virtual void DoGetSpreadTable(SpreadsheetWithCopyToBookOptions options, string tableName, out DataTable result) { var spread = options?.Spreadsheet?.Workbook ?? Workbook; var range = SpreadsheetUtils.GetWorkbookRange(spread, tableName); result = SpreadsheetUtils.GetDataTable(range); CopyRangeToBook(range, options); AddComments(range, options.Comment); }
public static DataTable ExportToDataTable(this Table table) { if (table == null) { throw new ArgumentNullException(nameof(table)); } var result = SpreadsheetUtils.GetDataTable(table); return(result); }