HtmlSaveOptions class

HtmlSaveOptions class

Represents the options for saving html file.

Inheritance: HtmlSaveOptionsSaveOptions

The HtmlSaveOptions type exposes the following members:

Constructors

ConstructorDescription
initCreates options for saving html file.
initCreates options for saving htm file.

Properties

PropertyDescription
save_formatGets the save file format.
clear_dataMake the workbook empty after saving the file.
cached_file_folderThe cached file folder is used to store some large data.
validate_merged_areasIndicates whether validate merged cells before saving the file.
merge_areasIndicates whether merge the areas of conditional formatting and validation before saving the file.
create_directoryIf true and the directory does not exist, the directory will be automatically created before saving the file.
sort_namesIndicates whether sorting defined names before saving file.
sort_external_namesIndicates whether sorting external defined names before saving file.
refresh_chart_cacheIndicates whether refreshing chart cache data
warning_callbackGets or sets warning callback.
update_smart_artIndicates whether updating smart art setting.
The default value is false.
encrypt_document_propertiesIndicates whether encrypt document properties when saving as .xls file.
The default value is true.
ignore_invisible_shapesIndicate whether exporting those not visible shapes
page_titleThe title of the html page.
Only for saving to html stream.
attached_files_directoryThe directory that the attached files will be saved to.
Only for saving to html stream.
attached_files_url_prefixSpecify the Url prefix of attached files such as image in the html file.
Only for saving to html stream.
default_font_nameSpecify the default font name for exporting html, the default font will be used when the font of style is not existing,
If this property is null, Aspose.Cells will use universal font which have the same family with the original font,
the default value is null.
add_generic_fontIndicates whether to add a generic font to CSS font-family.
The default value is true
worksheet_scalableIndicates if zooming in or out the html via worksheet zoom level when saving file to html, the default value is false.
is_export_commentsIndicates if exporting comments when saving file to html, the default value is false.
export_comments_typeRepresents type of exporting comments to html files.
disable_downlevel_revealed_commentsIndicates if disable Downlevel-revealed conditional comments when exporting file to html, the default value is false.
is_exp_image_to_temp_dirIndicates whether exporting image files to temp directory.
Only for saving to html stream.
image_scalableIndicates whether using scalable unit to describe the image width
when using scalable unit to describe the column width.
The default value is true.
width_scalableIndicates whether exporting column width in unit of scale to html.
The default value is false.
export_single_tabIndicates whether exporting the single tab when the file only has one worksheet.
The default value is false.
export_images_as_base64Specifies whether images are saved in Base64 format to HTML, MHTML or EPUB.
export_active_worksheet_onlyIndicates if only exporting the active worksheet to html file.
If true then only the active worksheet will be exported to html file;
If false then the whole workbook will be exported to html file.
The default value is false.
export_print_area_onlyIndicates if only exporting the print area to html file. The default value is false.
export_areaGets or Sets the exporting CellArea of current active Worksheet.
If you set this attribute, the print area of current active Worksheet will be omitted.
Only the specified area will be exported when saving the file to html.
parse_html_tag_in_cellIndicates whether html tag(such as <div></div>) in cell should be parsed as cell value or preserved as it is.
The default value is true.
html_cross_string_typeIndicates if a cross-cell string will be displayed in the same way as MS Excel when saving an Excel file in html format.
By default the value is Default, so, for cross-cell strings, there is little difference between the html files created by Aspose.Cells and MS Excel.
But the performance for creating large html files,setting the value to Cross would be several times faster than setting it to Default or Fit2Cell.
hidden_col_display_typeHidden column(the width of this column is 0) in excel,before save this into html format,
if HtmlHiddenColDisplayType is “Remove”,the hidden column would not been output,
if the value is “Hidden”, the column would been output,but was hidden,the default value is “Hidden”
hidden_row_display_typeHidden row(the height of this row is 0) in excel,before save this into html format,
if HtmlHiddenRowDisplayType is “Remove”,the hidden row would not been output,
if the value is “Hidden”, the row would been output,but was hidden,the default value is “Hidden”
encodingIf not set,use Encoding.UTF8 as default enconding type.
export_object_listenerGets or sets the ExportObjectListener for exporting objects.
file_path_providerGets or sets the IFilePathProvider for exporting Worksheet to html separately.
stream_providerGets or sets the IStreamProvider for exporting objects.
image_optionsGet the ImageOrPrintOptions object before exporting
save_as_single_fileIndicates whether save the html as single file.
The default value is false.
show_all_sheetsIndicates whether showing all sheets when saving as a single html file.
export_page_headersIndicates whether exporting page headers.
export_page_footersIndicates whether exporting page headers.
export_hidden_worksheetIndicating if exporting the hidden worksheet content.The default value is true.
presentation_preferenceIndicating if html or mht file is presentation preference.
The default value is false.
if you want to get more beautiful presentation,please set the value to true.
cell_css_prefixGets and sets the prefix of the css name,the default value is “”.
table_css_idGets and sets the prefix of the type css name such as tr,col,td and so on, they are contained in the table element
which has the specific TableCssId attribute. The default value is “”.
is_full_path_linkIndicating whether using full path link in sheet00x.htm,filelist.xml and tabstrip.htm.
The default value is false.
export_worksheet_css_separatelyIndicating whether export the worksheet css separately.The default value is false.
export_similar_border_styleIndicating whether exporting the similar border style when the border style is not supported by browsers.
If you want to import the html or mht file to excel, please keep the default value.
The default value is false.
merge_empty_td_forcelyIndicates whether merging empty TD element forcedly when exporting file to html.
The size of html file will be reduced significantly after setting value to true. The default value is false.
If you want to import the html file to excel or export perfect grid lines when saving file to html,
please keep the default value.
merge_empty_td_typeThe option to merge contiguous empty cells(empty td elements)
The default value is MergeEmptyTdType.Default.
export_cell_coordinateIndicates whether exporting excel coordinate of nonblank cells when saving file to html. The default value is false.
If you want to import the output html to excel, please keep the default value.
export_extra_headingsIndicates whether exporting extra headings when the length of text is longer than max display column.
The default value is false. If you want to import the html file to excel, please keep the default value.
export_headingsIndicates whether exports sheet’s row and column headings when saving to HTML files.
export_row_column_headingsIndicates whether exports sheet’s row and column headings when saving to HTML files.
export_formulaIndicates whether exporting formula when saving file to html. The default value is true.
If you want to import the output html to excel, please keep the default value.
add_tooltip_textIndicates whether adding tooltip text when the data can’t be fully displayed.
The default value is false.
export_grid_linesIndicating whether exporting the gridlines.The default value is false.
export_bogus_row_dataIndicating whether exporting bogus bottom row data. The default value is true.If you want to import the html or mht file
to excel, please keep the default value.
exclude_unused_stylesIndicating whether excludes unused styles.
For the generated html files, excluding unused styles can make the file size smaller
without affecting the visual effects. So the default value of this property is true.
If user needs to keep all styles in the workbook for the generated html(such as the scenario that user
needs to restore the workbook from the generated html later), please set this property as false.
export_document_propertiesIndicating whether exporting document properties.The default value is true.If you want to import
the html or mht file to excel, please keep the default value.
export_worksheet_propertiesIndicating whether exporting worksheet properties.The default value is true.If you want to import
the html or mht file to excel, please keep the default value.
export_workbook_propertiesIndicating whether exporting workbook properties.The default value is true.If you want to import
the html or mht file to excel, please keep the default value.
export_frame_scripts_and_propertiesIndicating whether exporting frame scripts and document properties. The default value is true.If you want to import the html or mht file
to excel, please keep the default value.
export_data_optionsIndicating the rule of exporting html file data.The default value is All.
link_target_typeIndicating the type of target attribute in <a> link. The default value is HtmlLinkTargetType.Parent.
is_ie_compatibleIndicating whether the output HTML is compatible with IE browser.
The defalut value is false
format_data_ignore_column_widthIndicating whether show the whole formatted data of cell when overflowing the column.
If true then ignore the column width and the whole data of cell will be exported.
If false then the data will be exported same as Excel.
The default value is false.
calculate_formulaIndicates whether to calculate formulas before saving html file.
is_js_browser_compatibleIndicates whether JavaScript is compatible with browsers that do not support JavaScript.
The default value is true.
is_mobile_compatibleIndicates whether the output HTML is compatible with mobile devices.
The default value is false.
css_stylesGets or sets the additional css styles for the formatter.
Only works when HtmlSaveOptions.save_as_single_file is True.

CssStyles=“body { padding: 5px }”;
hide_overflow_wrapped_textIndicates whether to hide overflow text when the cell format is set to wrap text.
The default value is false
is_border_collapsedIndicates whether the table borders are collapsed.
The default value is true.
encode_entity_as_codeIndicates whether the html character entities are replaced with decimal code.
(e.g. “ ” is replaced with “ ”).
The default value is false.

See Also