Table of Contents

Method Format

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

Format(XlsxCellValue, string?, XlsxFormatContext?)

Shows a value through a number format code.

public static XlsxFormattedText Format(XlsxCellValue value, string? code, XlsxFormatContext? context = null)

Parameters

value XlsxCellValue

The value. Text goes through the code's text section; a boolean is TRUE or FALSE and an error is its literal, whatever the code.

code string

The code, such as #,##0.00 or yyyy-mm-dd; null or empty is the general format, and so is one longer than MaxCodeLength.

context XlsxFormatContext

The culture, the date system and the column width, or null for the defaults.

Returns

XlsxFormattedText

The text, the colour the section names, and whether the text is a fill or an overflow.