Table of Contents

Class XlsxDocumentSheet

Namespace
DocWright.Formats.Xlsx
Assembly
DocWright.Formats.Xlsx.dll

One sheet of an opened workbook.

public sealed class XlsxDocumentSheet
Inheritance
XlsxDocumentSheet
Inherited Members

Properties

Cells

Gets the sheet's cells one at a time, in the order the sheet stores them - by row and then by column in any file Excel wrote.

Dimension

Gets the smallest range that holds every cell the sheet stores, or null when it stores none.

FrozenColumns

Gets the number of columns frozen at the left of the sheet; 0 when none are.

FrozenRows

Gets the number of rows frozen at the top of the sheet; 0 when none are.

Kind

Gets what the sheet is. Only a Worksheet has cells to read.

MergedRanges

Gets the merged ranges of the sheet, in the order the sheet lists them, with any merged or unmerged since the workbook was opened applied.

Name

Gets the sheet's name, as its tab shows it.

Visibility

Gets or sets whether the sheet is shown.

Methods

Clear(int, int)

Empties a cell: its value and its formula go, and the cell stays for its format.

Clear(string)

Empties a cell by its reference. See Clear(int, int).

FindPlaceholderNames(XlsxPlaceholderOptions?)

Lists the placeholders the sheet's text cells hold, such as {{Customer}}.

FindRegex(string, XlsxFindOptions?)

Finds every match of a regular expression in the sheet's cells.

FindText(string, XlsxFindOptions?)

Finds every occurrence of a text in the sheet's cells.

FindWildcards(string, XlsxFindOptions?)

Finds every match of an Excel wildcard pattern in the sheet's cells: ? any one character, * any run, ~ before either for the character itself.

GetCell(int, int)

Gets one cell.

GetCell(string)

Gets one cell by its reference.

GetColumnWidth(int)

Gets the width the sheet states for a column.

GetRowHeight(int)

Gets the height the sheet states for a row.

IsColumnHidden(int)

Gets whether a column is hidden: marked hidden, or given a width of zero.

Merge(XlsxCellRange)

Merges a range of cells into one.

Remove(int, int)

Takes a cell out of the sheet altogether: value, formula and format. Nothing moves; the cells around it stay where they are.

Remove(string)

Takes a cell out of the sheet by its reference. See Remove(int, int).

ReplacePlaceholders(IReadOnlyDictionary<string, object?>, XlsxPlaceholderOptions?)

Fills the placeholders in the sheet's text cells from a dictionary.

ReplaceRegex(string, string, XlsxFindOptions?)

Replaces every match of a regular expression in the sheet's cells.

ReplaceText(string, string, XlsxFindOptions?)

Replaces every occurrence of a text in the sheet's cells.

SetColumnWidth(int, decimal)

Sets a column's width.

SetFormula(int, int, string)

Sets a cell's formula. Its format is kept; it has no value until an application calculates it.

SetFormula(string, string)

Sets a cell's formula by its reference. See SetFormula(int, int, string).

SetRowHeight(int, decimal)

Sets a row's height.

SetStyle(int, int, XlsxCellStyle)

Sets how a cell looks. Its value and its formula are kept.

SetStyle(string, XlsxCellStyle)

Sets how a cell looks by its reference. See SetStyle(int, int, XlsxCellStyle).

SetValue(int, int, XlsxCellValue)

Sets a cell's value. A formula the cell had is removed; its format is kept.

SetValue(string, XlsxCellValue)

Sets a cell's value by its reference. See SetValue(int, int, XlsxCellValue).

Unmerge(XlsxCellRange)

Unmerges a merged range.