Show / Hide Table of Contents

Class ExcelHtmlTableExporter

Exports a ExcelTable to Html

Inheritance
System.Object
HtmlExporterBase
ExcelHtmlTableExporter
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OfficeOpenXml.Export.HtmlExport
Assembly: EPPlus.dll
Syntax
public class ExcelHtmlTableExporter : HtmlExporterBase

Properties

Settings

Settings for the HTML export

Declaration
public HtmlTableExportSettings Settings { get; }
Property Value
Type Description
HtmlTableExportSettings

Methods

GetCssString()

Exports an ExcelTable to a html string

Declaration
public string GetCssString()
Returns
Type Description
System.String

A html table

GetCssStringAsync()

Exports the css part of an ExcelTable to a html string

Declaration
public async Task<string> GetCssStringAsync()
Returns
Type Description
System.Threading.Tasks.Task<System.String>

A html table

GetHtmlString()

Exports an ExcelTable to a html string

Declaration
public string GetHtmlString()
Returns
Type Description
System.String

A html table

GetHtmlStringAsync()

Exports an ExcelTable to a html string

Declaration
public async Task<string> GetHtmlStringAsync()
Returns
Type Description
System.Threading.Tasks.Task<System.String>

A html table

GetSinglePage(String)

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

Declaration
public 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
Type Name Description
System.String htmlDocument

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
Type Description
System.String

The html document

GetSinglePageAsync(String)

Renders the Html and the Css to a single page.

Declaration
public async 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
Type Name Description
System.String htmlDocument

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
Type Description
System.Threading.Tasks.Task<System.String>

The html document

RenderCss(Stream)

Exports the css part of an ExcelTable to a html string

Declaration
public void RenderCss(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream

RenderCssAsync(Stream)

Exports the css part of an ExcelTable to a html string

Declaration
public async Task RenderCssAsync(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream
Returns
Type Description
System.Threading.Tasks.Task

A html table

RenderHtml(Stream)

Exports the html part of an ExcelTable to a html string.

Declaration
public void RenderHtml(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream

The stream to write to.

Exceptions
Type Condition
System.IO.IOException

RenderHtmlAsync(Stream)

Exports the html part of an ExcelTable to a stream

Declaration
public async Task RenderHtmlAsync(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream
Returns
Type Description
System.Threading.Tasks.Task

A html table

In This Article
Back to top Generated by DocFX