Interface IExcelHtmlTableExporter
Exports an ExcelTable to html and css.
Namespace: OfficeOpenXml.Export.HtmlExport.Interfaces
Assembly: EPPlus.dll
Syntax
public interface IExcelHtmlTableExporter
Properties
Settings
Settings for the html export
Declaration
HtmlTableExportSettings Settings { get; }
Property Value
Type | Description |
---|---|
HtmlTableExportSettings |
Methods
GetCssString()
Exports an ExcelTable to a html string
Declaration
string GetCssString()
Returns
Type | Description |
---|---|
System.String | Cascading style sheet for the exported range |
GetCssStringAsync()
Exports the css part of an ExcelTable to a html string
Declaration
Task<string> GetCssStringAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | A html table |
GetHtmlString()
Exports an ExcelTable to a html string
Declaration
string GetHtmlString()
Returns
Type | Description |
---|---|
System.String | A html table |
GetHtmlStringAsync()
Exports an ExcelTable to a html string
Declaration
Task<string> GetHtmlStringAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | A html table |
GetSinglePage(String)
Renders both the Html and the Css to a single page.
Declaration
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 first range of the Html and the Css to a single page.
Declaration
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 the html export.
Declaration
void RenderCss(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to write the css to. |
Exceptions
Type | Condition |
---|---|
System.IO.IOException |
RenderCssAsync(Stream)
Exports the css part of an ExcelTable to a html string
Declaration
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 an ExcelTable to a html string
Declaration
void RenderHtml(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to write to |
RenderHtmlAsync(Stream)
Exports an ExcelTable to a html string
Declaration
Task RenderHtmlAsync(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to write to |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A html table |