HtmlSaveOptions Class
Represents options for saving to HyperText Markup Language File (HTML) format.
public sealed class HtmlSaveOptions : SaveOptions
Public NotInheritable Class HtmlSaveOptions
Inherits SaveOptions
- Inheritance:
- System.ObjectHtmlSaveOptions
Constructors
HtmlSaveOptions()
Initializes a new instance of the HtmlSaveOptions class.
Properties
ContentType
Gets the content-type for HTML file format:
public override string ContentType { get; }
Public Overrides ReadOnly Property ContentType As String
Property Value
- System.String
The content-type for HTML file format.
Overrides
EmbedImages
Gets or sets a value indicating whether images are embedded directly within the HTML file in form of Base64 encoding.
Property Value
- System.Boolean
Remarks
If the value of this property is true then each image element will contain raw image data in its source attribute. This value doesn't change the pictures export behavior when using Mhtml.
Encoding
Gets or sets the encoding for the Html file.
Property Value
- System.Text.Encoding
Exceptions
- System.ArgumentNullException
Value is set to null.
FilesDirectoryPath
Gets or sets the physical directory where ExcelPictures and ExcelWorksheets files will be saved.
Property Value
- System.String
The physical directory where ExcelPictures and ExcelWorksheets files will be saved.
Remarks
If value is null or System.String.Empty and HTML export is called with Save(String) or Save(String, SaveOptions) overload, value will be automatically set to htmlFileNameWithoutExtension + "_files". This directory will be created in the same location as HTML file.
FilesDirectorySrcPath
Gets or sets the relative directory that will be used when referencing ExcelPictures and ExcelWorksheets files in the HTML.
public string FilesDirectorySrcPath { get; set; }
Public Property FilesDirectorySrcPath As String
Property Value
- System.String
The relative directory that will be used when referencing ExcelPictures and ExcelWorksheets files in the HTML.
Remarks
If value is null or System.String.Empty and HTML export is called with Save(String) or Save(String, SaveOptions) overload, value will be automatically set to htmlFileNameWithoutExtension + "_files".
HtmlType
Gets or sets the type of export.
Property Value
Remarks
For Html and HtmlTable values, pictures will be exported only if Save(String) or Save(String, SaveOptions) overload is used or if FilesDirectoryPath is specified or if EmbedImages is set to true.
For Mhtml value, pictures are always exported.
Limitations
Gets limitations for saving to HTML file format.
public override FileFormatLimitations Limitations { get; }
Public Overrides ReadOnly Property Limitations As FileFormatLimitations
Property Value
Overrides
Remarks
These are the limits:
- MaxRows: System.Int32.MaxValue
- MaxColumns: System.Int32.MaxValue
- MaxColors: System.Int32.MaxValue
- MaxCellStyles: System.Int32.MaxValue
SelectionType
Gets or sets a value indicating whether to save the whole ExcelFile or just ActiveWorksheet.
public SelectionType SelectionType { get; set; }
Public Property SelectionType As SelectionType
Property Value
WriteCellAddress
Gets or sets a value indicating whether each td HTML element should contain data-cell attribute with cell address for this cell.
Property Value
- System.Boolean
Remarks
If the value of this property is true then each td HTML element will contain data-cell attribute with cell address for this cell (for example data-cell="A1").
Inherited Properties
CsvDefault | Gets the default options for saving to Character Separated Values file format. (Inherited from SaveOptions) |
HtmlDefault | Gets the default options for saving to HyperText Markup Language File format. (Inherited from SaveOptions) |
ImageDefault | Gets the default options for saving to image formats. (Inherited from SaveOptions) |
OdsDefault | Gets the default options for saving to OpenDocument Spreadsheet file format. (Inherited from SaveOptions) |
PdfDefault | Gets the default options for saving to Portable Document Format file. (Inherited from SaveOptions) |
TxtDefault | Gets the default options for saving to Tab delimited file format. (Inherited from SaveOptions) |
XlsDefault | Gets the default options for saving to, XLS file format (Microsoft Excel Spreadsheet format; Excel 2003 and prior versions) . (Inherited from SaveOptions) |
XlsbDefault | Gets the default options for saving to XLSB file format (Microsoft Excel Binary File Format). (Inherited from SaveOptions) |
XlsxDefault | Gets the default options for saving to XLSX file format (Microsoft Excel Open XML Spreadsheet; Excel 2007 and later). (Inherited from SaveOptions) |
XpsDefault | Gets the default options for saving to XML Paper Specification file format. (Inherited from SaveOptions) |