Method SetRichText
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
SetRichText(int, int, XlsxRichText)
Sets a cell's text formatted in parts (Phase 205): its runs, each with its format. The cell's format is kept, and a run without a format takes the cell's own font. Value then reads as the text, the runs joined; RichText as the runs.
public void SetRichText(int row, int column, XlsxRichText text)
Parameters
rowintThe one-based row.
columnintThe one-based column.
textXlsxRichTextThe runs.
Exceptions
- ArgumentNullException
textis null.- ArgumentException
The text is longer than the 32,767 characters a cell holds.
- ArgumentOutOfRangeException
The row or the column is outside the worksheet grid.
- InvalidOperationException
The sheet is not a worksheet.
- UnsupportedFeatureException
The cell is part of an array formula entered over several cells.
- InvalidDocumentException
The sheet's part is malformed.
SetRichText(string, XlsxRichText)
Sets a cell's text formatted in parts by its reference. See SetRichText(int, int, XlsxRichText).
public void SetRichText(string reference, XlsxRichText text)
Parameters
referencestringThe cell, such as
B4.textXlsxRichTextThe runs.