Class EbookSaveOptions

EbookSaveOptions class

Represents the options for saving ebook file.

public class EbookSaveOptions : HtmlSaveOptions

Constructors

NameDescription
EbookSaveOptions()Creates options for saving ebook file.
EbookSaveOptions(SaveFormat)Creates options for saving ebook file.

Properties

NameDescription
AddGenericFont { get; set; }Indicates whether to add a generic font to CSS font-family. The default value is true(Inherited from HtmlSaveOptions.)
AddTooltipText { get; set; }Indicates whether adding tooltip text when the data can’t be fully displayed. The default value is false.(Inherited from HtmlSaveOptions.)
AttachedFilesDirectory { get; set; }The directory that the attached files will be saved to. Only for saving to html stream.(Inherited from HtmlSaveOptions.)
AttachedFilesUrlPrefix { get; set; }Specify the Url prefix of attached files such as image in the html file. Only for saving to html stream.(Inherited from HtmlSaveOptions.)
CachedFileFolder { get; set; }The cached file folder is used to store some large data.(Inherited from SaveOptions.)
CalculateFormula { get; set; }Indicates whether to calculate formulas before saving html file.(Inherited from HtmlSaveOptions.)
CellCssPrefix { get; set; }Gets and sets the prefix of the css name,the default value is “”.(Inherited from HtmlSaveOptions.)
CellNameAttribute { get; set; }Specifies the attribute that indicates the CellName to be written. (e.g. If the value is “id”, then for cell “A1”, the output will be:<td id=‘A1’>). The default value is null.(Inherited from HtmlSaveOptions.)
CheckExcelRestriction { get; set; }Whether check restriction of excel file when user modify cells related objects. For example, excel does not allow inputting string value longer than 32K. When you input a value longer than 32K, it will be truncated.(Inherited from SaveOptions.)
ClearData { get; set; }Make the workbook empty after saving the file.(Inherited from SaveOptions.)
CreateDirectory { get; set; }If true and the directory does not exist, the directory will be automatically created before saving the file.(Inherited from SaveOptions.)
CssStyles { get; set; }Gets or sets the additional css styles for the formatter. Only works when SaveAsSingleFile is True. CssStyles=“body { padding: 5px }”;(Inherited from HtmlSaveOptions.)
DefaultFontName { get; set; }Specify 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.(Inherited from HtmlSaveOptions.)
DisableCss { get; set; }Indicates whether only inline styles are applied, without relying on CSS. The default value is false.(Inherited from HtmlSaveOptions.)
DisableDownlevelRevealedComments { get; set; }Indicates if disable Downlevel-revealed conditional comments when exporting file to html, the default value is false.(Inherited from HtmlSaveOptions.)
EncodeEntityAsCode { get; set; }Indicates whether the html character entities are replaced with decimal code. (e.g. “&nbsp;” is replaced with “&#160;”). The default value is false.(Inherited from HtmlSaveOptions.)
Encoding { get; set; }If not set,use Encoding.UTF8 as default enconding type.(Inherited from HtmlSaveOptions.)
EncryptDocumentProperties { get; set; }Indicates whether encrypt document properties when saving as .xls file. The default value is true.(Inherited from SaveOptions.)
ExcludeUnusedStyles { get; set; }Indicating 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.(Inherited from HtmlSaveOptions.)
ExportActiveWorksheetOnly { get; set; }Indicates 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.(Inherited from HtmlSaveOptions.)
ExportArea { get; set; }Gets 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.(Inherited from HtmlSaveOptions.)
ExportBogusRowData { get; set; }Indicating 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.(Inherited from HtmlSaveOptions.)
ExportCellCoordinate { get; set; }Indicates 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.(Inherited from HtmlSaveOptions.)
ExportCommentsType { get; set; }Represents type of exporting comments to html files.(Inherited from HtmlSaveOptions.)
ExportDataOptions { get; set; }Indicating the rule of exporting html file data.The default value is All.(Inherited from HtmlSaveOptions.)
ExportDocumentProperties { get; set; }Indicating 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.(Inherited from HtmlSaveOptions.)
ExportExtraHeadings { get; set; }Indicates 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.(Inherited from HtmlSaveOptions.)
ExportFormula { get; set; }Indicates 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.(Inherited from HtmlSaveOptions.)
ExportFrameScriptsAndProperties { get; set; }Indicating 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.(Inherited from HtmlSaveOptions.)
ExportGridLines { get; set; }Indicating whether exporting the gridlines.The default value is false.(Inherited from HtmlSaveOptions.)
ExportHeadings { get; set; }(Obsolete.) Indicates whether exports sheet’s row and column headings when saving to HTML files.(Inherited from HtmlSaveOptions.)
ExportHiddenWorksheet { get; set; }Indicating if exporting the hidden worksheet content.The default value is true.(Inherited from HtmlSaveOptions.)
ExportImagesAsBase64 { get; set; }Specifies whether images are saved in Base64 format to HTML, MHTML or EPUB.(Inherited from HtmlSaveOptions.)
ExportObjectListener { get; set; }(Obsolete.) Gets or sets the ExportObjectListener for exporting objects.(Inherited from HtmlSaveOptions.)
ExportPageFooters { get; set; }Indicates whether exporting page headers.(Inherited from HtmlSaveOptions.)
ExportPageHeaders { get; set; }Indicates whether exporting page headers.(Inherited from HtmlSaveOptions.)
ExportPrintAreaOnly { get; set; }Indicates if only exporting the print area to html file. The default value is false.(Inherited from HtmlSaveOptions.)
ExportRowColumnHeadings { get; set; }Indicates whether exports sheet’s row and column headings when saving to HTML files.(Inherited from HtmlSaveOptions.)
ExportSimilarBorderStyle { get; set; }Indicating 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.(Inherited from HtmlSaveOptions.)
ExportSingleTab { get; set; }Indicates whether exporting the single tab when the file only has one worksheet. The default value is false.(Inherited from HtmlSaveOptions.)
ExportWorkbookProperties { get; set; }Indicating 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.(Inherited from HtmlSaveOptions.)
ExportWorksheetCSSSeparately { get; set; }Indicating whether export the worksheet css separately.The default value is false.(Inherited from HtmlSaveOptions.)
ExportWorksheetProperties { get; set; }Indicating 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.(Inherited from HtmlSaveOptions.)
FilePathProvider { get; set; }Gets or sets the IFilePathProvider for exporting Worksheet to html separately.(Inherited from HtmlSaveOptions.)
FormatDataIgnoreColumnWidth { get; set; }Indicating 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.(Inherited from HtmlSaveOptions.)
HiddenColDisplayType { get; set; }Hidden 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”(Inherited from HtmlSaveOptions.)
HiddenRowDisplayType { get; set; }Hidden 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”(Inherited from HtmlSaveOptions.)
HideOverflowWrappedText { get; set; }Indicates whether to hide overflow text when the cell format is set to wrap text. The default value is false(Inherited from HtmlSaveOptions.)
HtmlCrossStringType { get; set; }Indicates 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.(Inherited from HtmlSaveOptions.)
IgnoreInvisibleShapes { get; set; }Indicate whether exporting those not visible shapes(Inherited from HtmlSaveOptions.)
ImageOptions { get; }Get the ImageOrPrintOptions object before exporting(Inherited from HtmlSaveOptions.)
ImageScalable { get; set; }Indicates whether using scalable unit to describe the image width when using scalable unit to describe the column width. The default value is true.(Inherited from HtmlSaveOptions.)
IsBorderCollapsed { get; set; }Indicates whether the table borders are collapsed. The default value is true.(Inherited from HtmlSaveOptions.)
IsExpImageToTempDir { get; set; }Indicates whether exporting image files to temp directory. Only for saving to html stream.(Inherited from HtmlSaveOptions.)
IsExportComments { get; set; }Indicates if exporting comments when saving file to html, the default value is false.(Inherited from HtmlSaveOptions.)
IsFullPathLink { get; set; }Indicating whether using full path link in sheet00x.htm,filelist.xml and tabstrip.htm. The default value is false.(Inherited from HtmlSaveOptions.)
IsIECompatible { get; set; }Indicating whether the output HTML is compatible with IE browser. The defalut value is false(Inherited from HtmlSaveOptions.)
IsJsBrowserCompatible { get; set; }Indicates whether JavaScript is compatible with browsers that do not support JavaScript. The default value is true.(Inherited from HtmlSaveOptions.)
IsMobileCompatible { get; set; }Indicates whether the output HTML is compatible with mobile devices. The default value is false.(Inherited from HtmlSaveOptions.)
LinkTargetType { get; set; }Indicating the type of target attribute in <a> link. The default value is HtmlLinkTargetType.Parent.(Inherited from HtmlSaveOptions.)
MergeAreas { get; set; }Indicates whether merge the areas of conditional formatting and validation before saving the file.(Inherited from SaveOptions.)
MergeEmptyTdForcely { get; set; }(Obsolete.) Indicates 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.(Inherited from HtmlSaveOptions.)
MergeEmptyTdType { get; set; }The option to merge contiguous empty cells(empty td elements) The default value is MergeEmptyTdType.Default.(Inherited from HtmlSaveOptions.)
OfficeMathOutputMode { get; set; }Indicates how export OfficeMath objects to HTML, Default value is Image.(Inherited from HtmlSaveOptions.)
PageTitle { get; set; }The title of the html page. Only for saving to html stream.(Inherited from HtmlSaveOptions.)
ParseHtmlTagInCell { get; set; }Indicates 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.(Inherited from HtmlSaveOptions.)
PresentationPreference { get; set; }Indicating 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.(Inherited from HtmlSaveOptions.)
RefreshChartCache { get; set; }Indicates whether refreshing chart cache data(Inherited from SaveOptions.)
SaveAsSingleFile { get; set; }Indicates whether save the html as single file. The default value is false.(Inherited from HtmlSaveOptions.)
SaveFormat { get; }Gets the save file format.(Inherited from SaveOptions.)
ShowAllSheets { get; set; }Indicates whether showing all sheets when saving as a single html file.(Inherited from HtmlSaveOptions.)
SortExternalNames { get; set; }Indicates whether sorting external defined names before saving file.(Inherited from SaveOptions.)
SortNames { get; set; }Indicates whether sorting defined names before saving file.(Inherited from SaveOptions.)
StreamProvider { get; set; }Gets or sets the IStreamProvider for exporting objects.(Inherited from HtmlSaveOptions.)
TableCssId { get; set; }Gets 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 “”.(Inherited from HtmlSaveOptions.)
UpdateSmartArt { get; set; }Indicates whether updating smart art setting. The default value is false.(Inherited from SaveOptions.)
ValidateMergedAreas { get; set; }Indicates whether validate merged cells before saving the file.(Inherited from SaveOptions.)
WarningCallback { get; set; }Gets or sets warning callback.(Inherited from SaveOptions.)
WidthScalable { get; set; }Indicates whether exporting column width in unit of scale to html. The default value is false.(Inherited from HtmlSaveOptions.)
WorksheetScalable { get; set; }Indicates if zooming in or out the html via worksheet zoom level when saving file to html, the default value is false.(Inherited from HtmlSaveOptions.)

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using Aspose.Cells.Saving;
    using System;

    public class EbookSaveOptionsDemo
    {
        public static void EbookSaveOptionsExample()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];
            worksheet.Cells[0, 0].PutValue("Hello World");

            // Create an instance of EbookSaveOptions
            EbookSaveOptions saveOptions = new EbookSaveOptions();

            // Setting properties
            saveOptions.IgnoreInvisibleShapes = true;
            saveOptions.PageTitle = "Sample Page Title";
            saveOptions.AttachedFilesDirectory = "attached_files";
            saveOptions.AttachedFilesUrlPrefix = "http://example.com/files/";
            saveOptions.DefaultFontName = "Arial";
            saveOptions.AddGenericFont = true;
            saveOptions.WorksheetScalable = false;
            saveOptions.IsExportComments = false;
            saveOptions.ExportCommentsType = PrintCommentsType.PrintNoComments;
            saveOptions.DisableDownlevelRevealedComments = false;
            saveOptions.IsExpImageToTempDir = false;
            saveOptions.ImageScalable = true;
            saveOptions.WidthScalable = false;
            saveOptions.ExportSingleTab = false;
            saveOptions.ExportImagesAsBase64 = false;
            saveOptions.ExportActiveWorksheetOnly = false;
            saveOptions.ExportPrintAreaOnly = false;
            saveOptions.ExportArea = new CellArea { StartRow = 0, EndRow = 10, StartColumn = 0, EndColumn = 10 };
            saveOptions.ParseHtmlTagInCell = true;
            saveOptions.HtmlCrossStringType = HtmlCrossType.Default;
            saveOptions.HiddenColDisplayType = HtmlHiddenColDisplayType.Hidden;
            saveOptions.HiddenRowDisplayType = HtmlHiddenRowDisplayType.Hidden;
            saveOptions.Encoding = System.Text.Encoding.UTF8;
            saveOptions.SaveAsSingleFile = false;
            saveOptions.ShowAllSheets = true;
            saveOptions.ExportPageHeaders = true;
            saveOptions.ExportPageFooters = true;
            saveOptions.ExportHiddenWorksheet = true;
            saveOptions.PresentationPreference = false;
            saveOptions.CellCssPrefix = "cell_";
            saveOptions.TableCssId = "table_";
            saveOptions.IsFullPathLink = false;
            saveOptions.ExportWorksheetCSSSeparately = false;
            saveOptions.ExportSimilarBorderStyle = false;
            saveOptions.MergeEmptyTdForcely = false;
            saveOptions.MergeEmptyTdType = MergeEmptyTdType.Default;
            saveOptions.ExportCellCoordinate = false;
            saveOptions.ExportExtraHeadings = false;
            saveOptions.ExportHeadings = true;
            saveOptions.ExportRowColumnHeadings = true;
            saveOptions.ExportFormula = true;
            saveOptions.AddTooltipText = false;
            saveOptions.ExportGridLines = false;
            saveOptions.ExportBogusRowData = true;
            saveOptions.ExcludeUnusedStyles = true;
            saveOptions.ExportDocumentProperties = true;
            saveOptions.ExportWorksheetProperties = true;
            saveOptions.ExportWorkbookProperties = true;
            saveOptions.ExportFrameScriptsAndProperties = true;
            saveOptions.ExportDataOptions = HtmlExportDataOptions.All;
            saveOptions.LinkTargetType = HtmlLinkTargetType.Parent;
            saveOptions.IsIECompatible = false;
            saveOptions.FormatDataIgnoreColumnWidth = false;
            saveOptions.CalculateFormula = true;
            saveOptions.IsJsBrowserCompatible = true;
            saveOptions.IsMobileCompatible = false;
            saveOptions.CssStyles = "body { padding: 5px }";
            saveOptions.HideOverflowWrappedText = false;
            saveOptions.IsBorderCollapsed = true;
            saveOptions.ClearData = true;
            saveOptions.CachedFileFolder = "cache";
            saveOptions.ValidateMergedAreas = true;
            saveOptions.MergeAreas = true;
            saveOptions.SortNames = true;
            saveOptions.SortExternalNames = true;
            saveOptions.RefreshChartCache = true;
            saveOptions.WarningCallback = null;
            saveOptions.UpdateSmartArt = true;

            // Save the workbook to an HTML file with the specified options
            workbook.Save("EbookSaveOptionsExample.html", saveOptions);

            return;
        }
    }
}

See Also