コード例 #1
0
        protected void DoCreateDataTable(out DataTable dataTable)
        {
            var workbook = GetCmdletSpreadsheet();

            var range = SpreadsheetUtils.GetWorkbookRange(workbook, TableName);

            dataTable = SpreadsheetUtils.GetDataTable(range);

            CopyRangeToBook(range);
            AddComments(range);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public static DataTable ExportToDataTable(this Table table)
        {
            if (table == null)
            {
                throw new ArgumentNullException(nameof(table));
            }

            var result = SpreadsheetUtils.GetDataTable(table);

            return(result);
        }