![]() |
NanoXLSX.Formatting 3.0.0
|
Writer extension methods for the Worksheet class. More...
Static Public Member Functions | |
| static void | AddFormattedTextCell (this Worksheet worksheet, FormattedText formattedText, int columnNumber, int rowNumber) |
| Adds a formatted text to the specified cell. If the WrapText property of the formatted text is set to true, the LineBreakStyle will be applied automatically. | |
| static void | AddFormattedTextCell (this Worksheet worksheet, FormattedText formattedText, int columnNumber, int rowNumber, Style style) |
| Adds a formatted text to the specified cell with a style. If the WrapText property of the formatted text is set to true, the LineBreakStyle will be merged with the provided style automatically. | |
| static void | AddFormattedTextCell (this Worksheet worksheet, FormattedText formattedText, string address) |
| Adds a formatted text to the specified cell address. If the WrapText property of the formatted text is set to true, the LineBreakStyle will be applied automatically. | |
| static void | AddFormattedTextCell (this Worksheet worksheet, FormattedText formattedText, string address, Style style) |
| Adds a formatted text to the specified cell address with a style. If the WrapText property of the formatted text is set to true, the LineBreakStyle will be merged with the provided style automatically. | |
| static void | AddNextFormattedTextCell (this Worksheet worksheet, FormattedText formattedText) |
| Adds a formatted text to the next cell position. The direction of the next cell depends on the current cell direction (default is Worksheet.CellDirection.ColumnToColumn). If the WrapText property of the formatted text is set to true, the LineBreakStyle will be applied automatically. | |
| static void | AddNextFormattedTextCell (this Worksheet worksheet, FormattedText formattedText, Style style) |
| Adds a formatted text to the next cell position with a style. The direction of the next cell depends on the current cell direction (default is Worksheet.CellDirection.ColumnToColumn). If the WrapText property of the formatted text is set to true, the LineBreakStyle will be merged with the provided style automatically. | |
| static void | AddFormattedTextCellRange (this Worksheet worksheet, IReadOnlyList< FormattedText > values, string startAddress, string endAddress, Style style=null) |
| Adds a list of formatted texts to a defined cell range. Values are distributed column-by-column from the start address. Null values will be inserted as empty cells. If the WrapText property of a formatted text is set to true, the LineBreakStyle will be applied automatically to that cell. | |
| static void | AddFormattedTextCellRange (this Worksheet worksheet, IReadOnlyList< FormattedText > values, Address startAddress, Address endAddress, Style style=null) |
| Adds a list of formatted texts to a defined cell range with a style applied to all cells. Values are distributed column-by-column from the start address. Null values will be inserted as empty cells with the specified style. If the WrapText property of a formatted text is set to true, the LineBreakStyle will be merged with the provided style for that cell. | |
| static void | AddFormattedTextCellRange (this Worksheet worksheet, IReadOnlyList< FormattedText > values, string cellRange, Style style=null) |
| Adds a list of formatted texts to a defined cell range with a style applied to all cells. Values are distributed column-by-column from the start of the range. Null values will be inserted as empty cells with the specified style. If the WrapText property of a formatted text is set to true, the LineBreakStyle will be merged with the provided style for that cell. | |
Writer extension methods for the Worksheet class.
Definition at line 19 of file WorksheetExtensions.cs.
|
static |
Adds a formatted text to the specified cell. If the WrapText property of the formatted text is set to true, the LineBreakStyle will be applied automatically.
| worksheet | Worksheet reference |
| formattedText | Formatted text object |
| columnNumber | Column number (zero based) |
| rowNumber | Row number (zero based) |
| WorksheetException | Throws a WorksheetException if the passed text object is null |
| RangeException | Throws a RangeException if the passed cell address is out of range |
Definition at line 30 of file WorksheetExtensions.cs.
|
static |
Adds a formatted text to the specified cell with a style. If the WrapText property of the formatted text is set to true, the LineBreakStyle will be merged with the provided style automatically.
| worksheet | Worksheet reference |
| formattedText | Formatted text object |
| columnNumber | Column number (zero based) |
| rowNumber | Row number (zero based) |
| style | Style to apply to the cell. Will be merged with FormattedText.LineBreakStyle if FormattedText.WrapText true |
| WorksheetException | Throws a WorksheetException if the passed text object is null |
| RangeException | Throws a RangeException if the passed cell address is out of range |
Definition at line 46 of file WorksheetExtensions.cs.
|
static |
Adds a formatted text to the specified cell address. If the WrapText property of the formatted text is set to true, the LineBreakStyle will be applied automatically.
| worksheet | Worksheet reference |
| formattedText | Formatted text object |
| address | Cell address in the format A1 - XFD1048576 (e.g., "A1", "$B$5", "c12"). Case-insensitive, dollar signs are ignored |
| WorksheetException | Throws a WorksheetException if the passed text object is null |
| FormatException | Throws a FormatException if the passed address is malformed |
| RangeException | Throws a RangeException if the passed cell address is out of range |
Definition at line 60 of file WorksheetExtensions.cs.
|
static |
Adds a formatted text to the specified cell address with a style. If the WrapText property of the formatted text is set to true, the LineBreakStyle will be merged with the provided style automatically.
| worksheet | Worksheet reference |
| formattedText | Formatted text object |
| address | Cell address in the format A1 - XFD1048576 (e.g., "A1", "$B$5", "c12"). Case-insensitive, dollar signs are ignored |
| style | Style to apply to the cell. Will be merged with FormattedText.LineBreakStyle if FormattedText.WrapText true |
| WorksheetException | Throws a WorksheetException if the passed text object is null |
| FormatException | Throws a FormatException if the passed address is malformed |
| RangeException | Throws a RangeException if the passed cell address is out of range |
Definition at line 78 of file WorksheetExtensions.cs.
|
static |
Adds a list of formatted texts to a defined cell range with a style applied to all cells. Values are distributed column-by-column from the start address. Null values will be inserted as empty cells with the specified style. If the WrapText property of a formatted text is set to true, the LineBreakStyle will be merged with the provided style for that cell.
| worksheet | Worksheet reference |
| values | List of formatted text objects to insert. Null values are treated as empty cells |
| startAddress | Start address of the range |
| endAddress | End address of the range |
| style | Optional style to apply to all cells in the range. Will be merged with FormattedText.LineBreakStyle for cells where FormattedText.WrapText is true |
| WorksheetException | Throws a WorksheetException if the list of formatted texts is null or empty |
| RangeException | Throws a RangeException if the number of values does not match the number of cells in the range, or if any address is out of range |
Definition at line 140 of file WorksheetExtensions.cs.
|
static |
Adds a list of formatted texts to a defined cell range with a style applied to all cells. Values are distributed column-by-column from the start of the range. Null values will be inserted as empty cells with the specified style. If the WrapText property of a formatted text is set to true, the LineBreakStyle will be merged with the provided style for that cell.
| worksheet | Worksheet reference |
| values | List of formatted text objects to insert. Null values are treated as empty cells |
| cellRange | Cell range in the format A1:B10 (e.g., "A1:C5", "$A$1:$C$5", "a1:c5"). Case-insensitive, dollar signs are ignored |
| style | Optional style to apply to all cells in the range. Will be merged with FormattedText.LineBreakStyle for cells where FormattedText.WrapText is true |
| WorksheetException | Throws a WorksheetException if the list of formatted texts is null or empty |
| FormatException | Throws a FormatException if the cell range format is malformed |
| RangeException | Throws a RangeException if the number of values does not match the number of cells in the range, or if any address is out of range |
Definition at line 156 of file WorksheetExtensions.cs.
|
static |
Adds a list of formatted texts to a defined cell range. Values are distributed column-by-column from the start address. Null values will be inserted as empty cells. If the WrapText property of a formatted text is set to true, the LineBreakStyle will be applied automatically to that cell.
| worksheet | Worksheet reference |
| values | List of formatted text objects to insert. Null values are treated as empty cells |
| startAddress | Start address of the range as string |
| endAddress | End address of the range as string |
| style | Optional style to apply to all cells in the range. Will be merged with FormattedText.LineBreakStyle for cells where FormattedText.WrapText is true |
| WorksheetException | Throws a WorksheetException if the list of formatted texts is null or empty |
| RangeException | Throws a RangeException if the number of values does not match the number of cells in the range, or if any address is out of range |
Definition at line 124 of file WorksheetExtensions.cs.
|
static |
Adds a formatted text to the next cell position. The direction of the next cell depends on the current cell direction (default is Worksheet.CellDirection.ColumnToColumn). If the WrapText property of the formatted text is set to true, the LineBreakStyle will be applied automatically.
| worksheet | Worksheet reference |
| formattedText | Formatted text object |
| WorksheetException | Throws a WorksheetException if the passed text object is null |
| RangeException | Throws a RangeException if the next cell address is out of range |
Definition at line 94 of file WorksheetExtensions.cs.
|
static |
Adds a formatted text to the next cell position with a style. The direction of the next cell depends on the current cell direction (default is Worksheet.CellDirection.ColumnToColumn). If the WrapText property of the formatted text is set to true, the LineBreakStyle will be merged with the provided style automatically.
| worksheet | Worksheet reference |
| formattedText | Formatted text object |
| style | Style to apply to the cell. Will be merged with FormattedText.LineBreakStyle if FormattedText.WrapText is true |
| WorksheetException | Throws a WorksheetException if the passed text object is null |
| RangeException | Throws a RangeException if the next cell address is out of range |
Definition at line 108 of file WorksheetExtensions.cs.