Class XlsxTable
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
One table of a sheet (Phase 203). The object is live: it reads the table as the workbook has it now, and its setters change it.
public sealed class XlsxTable
- Inheritance
-
XlsxTable
- Inherited Members
Properties
- Columns
Gets the table's columns, from the left.
- Exists
Gets whether the sheet still has the table.
- HasHeaderRow
Gets whether the table shows its header row.
- HasTotalsRow
Gets or sets whether the table has a totals row (Excel's Total Row). Turning it on takes the row under the table, writing
Totalin the first column and, in the last, a sum of numbers or a count of anything else, as Excel does; turning it off clears that row. Excel also moves the cells under the table down (or up) in its columns; that is not done here, so either is refused while a cell under the table in its columns holds something.
- Name
Gets or sets the table's name, the one formulas use (
displayName). Setting it renames every structured reference to the table.
- Range
Gets the cells the table covers, its header and totals rows included.
- ShowColumnStripes
Gets or sets whether columns are striped (Excel's Banded Columns).
- ShowFirstColumn
Gets or sets whether the first column is emphasised.
- ShowLastColumn
Gets or sets whether the last column is emphasised.
- ShowRowStripes
Gets or sets whether rows are striped (Excel's Banded Rows).
- Style
Gets or sets the table's style: one of Excel's (
TableStyleLight1to21,TableStyleMedium1to28,TableStyleDark1to11); null when the file names none.
Methods
- Remove(bool)
Removes the table.
keepCellstrue is Excel's Convert to Range: the cells keep their values and formats, and every structured reference to the table becomes the cells it named, qualified by the sheet (Orders[Qty]becomesSheet1!$B$2:$B$9,[@Qty]in a row becomesSheet1!$B2), as Excel writes them. False clears the cells too, and a reference to the table becomes#REF!.
- Resize(XlsxCellRange)
Gives the table a new range, as Excel's Resize Table does: the header row stays where it is, at least one row of data remains, no other table is covered; columns added at the right are named from their header cells.
- ToString()
Returns the table as a line: its name and its range.