Interface IExcelHtmlRangeExporter
- Namespace
- OfficeOpenXml.Export.HtmlExport.Interfaces
- Assembly
- EPPlus.dll
Public interface for the Html exporter
public interface IExcelHtmlRangeExporter
Properties
Ranges
Exported ranges
EPPlusReadOnlyList<ExcelRangeBase> Ranges { get; }
Property Value
Settings
Settings for how to perform the html export
HtmlRangeExportSettings Settings { get; }
Property Value
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
GetHtmlString()
Exports an ExcelTable to a html string
string GetHtmlString()
Returns
- string
A html table
GetHtmlString(int)
Exports an ExcelTable to a html string
string GetHtmlString(int rangeIndex)
Parameters
rangeIndexint0-based index of the requested range
Returns
- string
A html table
GetHtmlString(int, ExcelHtmlOverrideExportSettings)
Exports an ExcelTable to a html string
string GetHtmlString(int rangeIndex, ExcelHtmlOverrideExportSettings settings)
Parameters
rangeIndexintIndex of the range to export
settingsExcelHtmlOverrideExportSettingsOverride some of the settings for this html exclusively
Returns
- string
A html table
GetHtmlString(int, Action<ExcelHtmlOverrideExportSettings>)
Exports an ExcelTable to a html string
string GetHtmlString(int rangeIndex, Action<ExcelHtmlOverrideExportSettings> config)
Parameters
rangeIndexintIndex of the range to export
configAction<ExcelHtmlOverrideExportSettings>Override some of the settings for this html exclusively
Returns
GetHtmlStringAsync()
Exports an ExcelTable to a html string
Task<string> GetHtmlStringAsync()
Returns
GetHtmlStringAsync(int, ExcelHtmlOverrideExportSettings)
Exports an ExcelTable to a html string
Task<string> GetHtmlStringAsync(int rangeIndex, ExcelHtmlOverrideExportSettings settings = null)
Parameters
rangeIndexintIndex of the range to export
settingsExcelHtmlOverrideExportSettingsOverride some of the settings for this html exclusively
Returns
GetHtmlStringAsync(int, Action<ExcelHtmlOverrideExportSettings>)
Exports an ExcelTable to a html string
Task<string> GetHtmlStringAsync(int rangeIndex, Action<ExcelHtmlOverrideExportSettings> config)
Parameters
rangeIndexintIndex of the range to export
configAction<ExcelHtmlOverrideExportSettings>Override some of the settings for this html exclusively
Returns
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}\r\n</body>\r\n</html>")
Parameters
htmlDocumentstringThe 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}\r\n</body>\r\n</html>")
Parameters
htmlDocumentstringThe 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
RenderCss(Stream)
Exports the css part of the html export.
void RenderCss(Stream stream)
Parameters
streamStreamThe stream to write the css to.
Exceptions
RenderCssAsync(Stream)
Exports the css part of an ExcelTable to a html string
Task RenderCssAsync(Stream stream)
Parameters
streamStream
Returns
- Task
A html table
RenderHtml(Stream)
Exports an ExcelTable to a html string
void RenderHtml(Stream stream)
Parameters
streamStreamThe stream to write to
RenderHtml(Stream, int, ExcelHtmlOverrideExportSettings)
Exports an ExcelTable to a html string
void RenderHtml(Stream stream, int rangeIndex, ExcelHtmlOverrideExportSettings overrideSettings = null)
Parameters
streamStreamThe stream to write to
rangeIndexintThe index of the range to output.
overrideSettingsExcelHtmlOverrideExportSettingsSettings for this specific range index
RenderHtml(Stream, int, Action<ExcelHtmlOverrideExportSettings>)
Exports an ExcelTable to a html string
void RenderHtml(Stream stream, int rangeIndex, Action<ExcelHtmlOverrideExportSettings> config)
Parameters
streamStreamThe stream to write to
rangeIndexintThe index of the range to output.
configAction<ExcelHtmlOverrideExportSettings>Settings for this specific range index
RenderHtmlAsync(Stream)
Exports an ExcelTable to a html string
Task RenderHtmlAsync(Stream stream)
Parameters
streamStreamThe stream to write to
Returns
- Task
A html table
RenderHtmlAsync(Stream, int, ExcelHtmlOverrideExportSettings)
Exports the html part of the html export, without the styles.
Task RenderHtmlAsync(Stream stream, int rangeIndex, ExcelHtmlOverrideExportSettings overrideSettings = null)
Parameters
streamStreamThe stream to write to.
rangeIndexintThe index of the range to output.
overrideSettingsExcelHtmlOverrideExportSettingsSettings for this specific range index
Returns
Exceptions
RenderHtmlAsync(Stream, int, Action<ExcelHtmlOverrideExportSettings>)
Exports the html part of the html export, without the styles.
Task RenderHtmlAsync(Stream stream, int rangeIndex, Action<ExcelHtmlOverrideExportSettings> config)
Parameters
streamStreamThe stream to write to.
rangeIndexintIndex of the range to export
configAction<ExcelHtmlOverrideExportSettings>Override some of the settings for this html exclusively