Class HtmlExportSettings
- Namespace
- OfficeOpenXml.Export.HtmlExport
- Assembly
- EPPlus.dll
Base class for HTML export for ranges and tables.
public abstract class HtmlExportSettings
- Inheritance
-
HtmlExportSettings
- Derived
- Inherited Members
Constructors
HtmlExportSettings()
protected HtmlExportSettings()
Properties
Accessibility
Settings for usage of accessibility (aria, role) attributes of the table
public AccessibilitySettings Accessibility { get; }
Property Value
AdditionalTableClassNames
Use this property to set additional class names that will be set on the exported html-table.
public List<string> AdditionalTableClassNames { get; protected set; }
Property Value
CellStyleClassName
The name of the classes used for cell styles. The name will be prefixed with the StyleClassPrefix and suffixed with the cell style index.
public string CellStyleClassName { get; set; }
Property Value
ConditionalFormattingClassName
The name of the classes used for cell styles. The name will be prefixed with the DxfStyleClassName and suffixed with the conditional formatting style index.
public string ConditionalFormattingClassName { get; set; }
Property Value
Culture
The culture used when formatting the cell output.
public CultureInfo Culture { get; set; }
Property Value
DataValueAttributeName
Use this property to set the name of the html data-* attribute that contains the raw value. Default value is "value" which means that the name of the attribute is "data-value". To change the name to "data-x", set this property to "x"
public string DataValueAttributeName { get; set; }
Property Value
DatabarPrefix
The name of the classes used for cell styles. The name will be prefixed with the StyleClassPrefix.
public string DatabarPrefix { get; set; }
Property Value
DxfStyleClassName
The name of the classes used for cell styles. The name will be prefixed with the StyleClassPrefix and suffixed with the cell style index.
public string DxfStyleClassName { get; set; }
Property Value
Encoding
Encoding for the output
public Encoding Encoding { get; set; }
Property Value
HiddenRows
How hidden rows will be handled. Default is Exclude
public eHiddenState HiddenRows { get; set; }
Property Value
HorizontalAlignmentWhenGeneral
How to set the alignment for a cell if it's alignment is set to General.
public eHtmlGeneralAlignmentHandling HorizontalAlignmentWhenGeneral { get; set; }
Property Value
HyperlinkTarget
Set the target attribute for hyperlinks (a elements) in the exported html. Can be null/empty (no target attribute), _blank, _top, _self, _parent or a frame-name.
public string HyperlinkTarget { get; set; }
Property Value
IconPrefix
The name of the classes used to store icon images. The name will be prefixed with the StyleClassPrefix and suffixed with the icon name.
public string IconPrefix { get; set; }
Property Value
IncludeCssClassNames
If set to true classes that identifies Excel table styling will be included in the html. Default value is true.
public bool IncludeCssClassNames { get; set; }
Property Value
Minify
If set to true the rendered html will be formatted with indents and linebreaks.
public bool Minify { get; set; }
Property Value
Pictures
If picture drawings will be included. Default is true.
public HtmlPictureSettings Pictures { get; }
Property Value
RenderConditionalFormattings
If true conditionalFormattings will be rendered
public bool RenderConditionalFormattings { get; set; }
Property Value
RenderDataAttributes
If true data-* attributes will be rendered
public bool RenderDataAttributes { get; set; }
Property Value
RenderDataTypes
If true, data types are renedered on the header objects.
public bool RenderDataTypes { get; set; }
Property Value
SetColumnWidth
Set the column width for columns in the table via the columngroup/col element. Columns with the default width will have the default column width class set, ({Settings.StyleClassPrefix}dcw). Columns with custom column width will have the width set directly via the style attribute.
public bool SetColumnWidth { get; set; }
Property Value
SetRowHeight
Set the row height for rows in the table. Rows with the default height will have the default row height class set, ({Settings.StyleClassPrefix}drh). Rows with custom row height will have the height set directly via the style attribute.
public bool SetRowHeight { get; set; }
Property Value
StyleClassPrefix
Prefix for style classes added by EPPlus.
type | Class name |
---|---|
Cell styles | {StyleClassPrefix}{CellStyleClassName}{index} |
Hidden Row{StyleClassPrefix}hidden | |
Alignment Left | {StyleClassPrefix}al |
Alignment Right | {StyleClassPrefix}ar |
Default column width | {StyleClassPrefix}dcw |
Default row height | {StyleClassPrefix}drh |
Image content and position | {StyleClassPrefix}image-{imageName} |
Properties for an image, for example position or border settings | {StyleClassPrefix}image-prop-{imageName} |
Alignment for cells containing an image | {StyleClassPrefix}image-cell} |
public string StyleClassPrefix { get; set; }
Property Value
TableId
The html id attribute for the exported table. The id attribute is only added to the table if this property is not null or empty.
public string TableId { get; set; }
Property Value
TableStyle
If and how table styles should export, if the range is a table. The range must be the same as the table range.
public eHtmlRangeTableInclude TableStyle { get; set; }