Interface ExcelCell
- All Superinterfaces:
ExportCell
ExcelCell is a specialization of ExportCell for exporting to the Microsoft Excel format, offering
limited support for Excel-specific styling.
Excel export is backed by Apache POI. For advanced formatting you can call the underlying POI objects directly, obtaining them from the column context.
-
Method Summary
Modifier and TypeMethodDescriptionvoidsetIndention(int indention) Set the indentation level for the cell.voidsetRichTextFromHtml(String html) Attempts to convert an HTML fragment into a rich text string and set that as the cell value.voidsetStyle(ExcelStyle style) Set the cell style.Methods inherited from interface ExportCell
setDate, setDatetime, setDuration, setHyperlink, setNumber, setPercentage, setText
-
Method Details
-
setRichTextFromHtml
Attempts to convert an HTML fragment into a rich text string and set that as the cell value. The conversion used is very primitive, at present it only supports<b>,<i>,<em>, and<strong>HTML tags. If the passed HTML fragment is invalid, it may be treated as a literal string.- Parameters:
html- The HTML fragment.
-
setStyle
Set the cell style. The style is very important for the correct display of your values, as it determines the cell's value format, alignment, font, and color. For most value types it is expected that you set the data cell style accordingly. We recommend you to useExcelColumn.setDefaultStyle(ExcelStyle)once instead of setting the same style to each data cell. It is OK to usesetStyle()for column header cells.- Parameters:
style- The style.
-
setIndention
void setIndention(int indention) Set the indentation level for the cell. This is used by Structure's Summary column to show an issue's depth within the structure. Indentation levels over 15 cannot be represented due to Excel format limitations.- Parameters:
indention- The indentation level, clamped to be between 0 and 15, inclusive.
-