Table of Contents

Interface IExcelHtmlTableExporter

Namespace
OfficeOpenXml.Export.HtmlExport.Interfaces
Assembly
EPPlus.dll

Exports an ExcelTable to html and css.

public interface IExcelHtmlTableExporter

Properties

Settings

Settings for the html export

HtmlTableExportSettings Settings { get; }

Property Value

HtmlTableExportSettings

Methods

GetCssString()

Exports an ExcelTable to a html string

string GetCssString()

Returns

string

Cascading style sheet for the exported range

GetCssStringAsync()

Exports the css part of an ExcelTable to a html string

Task<string> GetCssStringAsync()

Returns

Task<string>

A html table

GetHtmlString()

Exports an ExcelTable to a html string

string GetHtmlString()

Returns

string

A html table

GetHtmlStringAsync()

Exports an ExcelTable to a html string

Task<string> GetHtmlStringAsync()

Returns

Task<string>

A html table

GetSinglePage(string)

Renders both the Html and the Css to a single page.

string GetSinglePage(string htmlDocument = "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n<style type=\"text/css\">\r\n{1}</style></head>\r\n<body>\r\n{0}</body>\r\n</html>")

Parameters

htmlDocument string

The html string where to insert the html and the css. The Html will be inserted in string parameter {0} and the Css will be inserted in parameter {1}.

Returns

string

The html document

GetSinglePageAsync(string)

Renders the first range of the Html and the Css to a single page.

Task<string> GetSinglePageAsync(string htmlDocument = "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n<style type=\"text/css\">\r\n{1}</style></head>\r\n<body>\r\n{0}</body>\r\n</html>")

Parameters

htmlDocument string

The html string where to insert the html and the css. The Html will be inserted in string parameter {0} and the Css will be inserted in parameter {1}.

Returns

Task<string>

The html document

RenderCss(Stream)

Exports the css part of the html export.

void RenderCss(Stream stream)

Parameters

stream Stream

The stream to write the css to.

Exceptions

IOException

RenderCssAsync(Stream)

Exports the css part of an ExcelTable to a html string

Task RenderCssAsync(Stream stream)

Parameters

stream Stream

Returns

Task

A html table

RenderHtml(Stream)

Exports an ExcelTable to a html string

void RenderHtml(Stream stream)

Parameters

stream Stream

The stream to write to

RenderHtmlAsync(Stream)

Exports an ExcelTable to a html string

Task RenderHtmlAsync(Stream stream)

Parameters

stream Stream

The stream to write to

Returns

Task

A html table