OoxmlSaveOptions

OoxmlSaveOptions class

Represents the options of saving office open xml file.

class OoxmlSaveOptions extends SaveOptions;

Constructors

NameDescription
constructor()Creates the options for saving office open xml file.
constructor(SaveOptions)Constructs from a parent object convertible to this.
constructor(SaveFormat)Creates the options for saving office open xml file.

Methods

MethodDescription
getExportCellName()Indicates if export cell name to Excel2007 .xlsx (.xlsm, .xltx, .xltm) file. If the output file may be accessed by SQL Server DTS, this value must be true. Setting the value to false will highly increase the performance and reduce the file size when creating large file. Default value is true.
setExportCellName(boolean)Indicates if export cell name to Excel2007 .xlsx (.xlsm, .xltx, .xltm) file. If the output file may be accessed by SQL Server DTS, this value must be true. Setting the value to false will highly increase the performance and reduce the file size when creating large file. Default value is true.
getLightCellsDataProvider()The data provider for saving workbook in light mode.
setLightCellsDataProvider(LightCellsDataProvider)The data provider for saving workbook in light mode.
getUpdateZoom()Indicates whether update scaling factor before saving the file if the PageSetup.FitToPagesWide and PageSetup.FitToPagesTall properties control how the worksheet is scaled.
setUpdateZoom(boolean)Indicates whether update scaling factor before saving the file if the PageSetup.FitToPagesWide and PageSetup.FitToPagesTall properties control how the worksheet is scaled.
getEnableZip64()Always use ZIP64 extensions when writing zip archives, even when unnecessary.
setEnableZip64(boolean)Always use ZIP64 extensions when writing zip archives, even when unnecessary.
getEmbedOoxmlAsOleObject()Indicates whether embedding Ooxml files of OleObject as ole object.
setEmbedOoxmlAsOleObject(boolean)Indicates whether embedding Ooxml files of OleObject as ole object.
getCompressionType()Gets and sets the compression type for ooxml file.
setCompressionType(OoxmlCompressionType)Gets and sets the compression type for ooxml file.
isNull()Checks whether the implementation object is null.
getSaveFormat()Gets the save file format.
getClearData()Make the workbook empty after saving the file.
setClearData(boolean)Make the workbook empty after saving the file.
getCachedFileFolder()The cached file folder is used to store some large data.
setCachedFileFolder(string)The cached file folder is used to store some large data.
getValidateMergedAreas()Indicates whether validate merged cells before saving the file.
setValidateMergedAreas(boolean)Indicates whether validate merged cells before saving the file.
getMergeAreas()Indicates whether merge the areas of conditional formatting and validation before saving the file.
setMergeAreas(boolean)Indicates whether merge the areas of conditional formatting and validation before saving the file.
getCreateDirectory()If true and the directory does not exist, the directory will be automatically created before saving the file.
setCreateDirectory(boolean)If true and the directory does not exist, the directory will be automatically created before saving the file.
getSortNames()Indicates whether sorting defined names before saving file.
setSortNames(boolean)Indicates whether sorting defined names before saving file.
getSortExternalNames()Indicates whether sorting external defined names before saving file.
setSortExternalNames(boolean)Indicates whether sorting external defined names before saving file.
getRefreshChartCache()Indicates whether refreshing chart cache data
setRefreshChartCache(boolean)Indicates whether refreshing chart cache data
setWarningCallback(IWarningCallback)Gets or sets warning callback.
getWarningCallback()Gets or sets warning callback.
getUpdateSmartArt()Indicates whether updating smart art setting. The default value is false.
setUpdateSmartArt(boolean)Indicates whether updating smart art setting. The default value is false.
getEncryptDocumentProperties()Indicates whether encrypt document properties when saving as .xls file. The default value is true.
setEncryptDocumentProperties(boolean)Indicates whether encrypt document properties when saving as .xls file. The default value is true.

constructor()

Creates the options for saving office open xml file.

constructor();

constructor(SaveOptions)

Constructs from a parent object convertible to this.

constructor(obj: SaveOptions);

Parameters:

ParameterTypeDescription
objSaveOptionsThe parent object.

constructor(SaveFormat)

Creates the options for saving office open xml file.

constructor(saveFormat: SaveFormat);

Parameters:

ParameterTypeDescription
saveFormatSaveFormatThe file format. /// It should be one of following types: SaveFormat.Xlsx, SaveFormat.Xltx, /// SaveFormat.Xlam, SaveFormat.Xlsm or SaveFormat.Xltm, /// otherwise the saved format will be set as SaveFormat.Xlsx automatically.

getExportCellName()

Indicates if export cell name to Excel2007 .xlsx (.xlsm, .xltx, .xltm) file. If the output file may be accessed by SQL Server DTS, this value must be true. Setting the value to false will highly increase the performance and reduce the file size when creating large file. Default value is true.

getExportCellName() : boolean;

setExportCellName(boolean)

Indicates if export cell name to Excel2007 .xlsx (.xlsm, .xltx, .xltm) file. If the output file may be accessed by SQL Server DTS, this value must be true. Setting the value to false will highly increase the performance and reduce the file size when creating large file. Default value is true.

setExportCellName(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getLightCellsDataProvider()

The data provider for saving workbook in light mode.

getLightCellsDataProvider() : LightCellsDataProvider;

Returns

LightCellsDataProvider

setLightCellsDataProvider(LightCellsDataProvider)

The data provider for saving workbook in light mode.

setLightCellsDataProvider(value: LightCellsDataProvider) : void;

Parameters:

ParameterTypeDescription
valueLightCellsDataProviderThe value to set.

getUpdateZoom()

Indicates whether update scaling factor before saving the file if the PageSetup.FitToPagesWide and PageSetup.FitToPagesTall properties control how the worksheet is scaled.

getUpdateZoom() : boolean;

Remarks

The default value is false for performance.

setUpdateZoom(boolean)

Indicates whether update scaling factor before saving the file if the PageSetup.FitToPagesWide and PageSetup.FitToPagesTall properties control how the worksheet is scaled.

setUpdateZoom(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is false for performance.

getEnableZip64()

Always use ZIP64 extensions when writing zip archives, even when unnecessary.

getEnableZip64() : boolean;

setEnableZip64(boolean)

Always use ZIP64 extensions when writing zip archives, even when unnecessary.

setEnableZip64(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getEmbedOoxmlAsOleObject()

Indicates whether embedding Ooxml files of OleObject as ole object.

getEmbedOoxmlAsOleObject() : boolean;

Remarks

Only for OleObject.

setEmbedOoxmlAsOleObject(boolean)

Indicates whether embedding Ooxml files of OleObject as ole object.

setEmbedOoxmlAsOleObject(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Only for OleObject.

getCompressionType()

Gets and sets the compression type for ooxml file.

getCompressionType() : OoxmlCompressionType;

Returns

OoxmlCompressionType

Remarks

The default value is OoxmlCompressionType.Level2.

setCompressionType(OoxmlCompressionType)

Gets and sets the compression type for ooxml file.

setCompressionType(value: OoxmlCompressionType) : void;

Parameters:

ParameterTypeDescription
valueOoxmlCompressionTypeThe value to set.

Remarks

The default value is OoxmlCompressionType.Level2.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;

getSaveFormat()

Gets the save file format.

getSaveFormat() : SaveFormat;

Returns

SaveFormat

getClearData()

Make the workbook empty after saving the file.

getClearData() : boolean;

setClearData(boolean)

Make the workbook empty after saving the file.

setClearData(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getCachedFileFolder()

The cached file folder is used to store some large data.

getCachedFileFolder() : string;

setCachedFileFolder(string)

The cached file folder is used to store some large data.

setCachedFileFolder(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getValidateMergedAreas()

Indicates whether validate merged cells before saving the file.

getValidateMergedAreas() : boolean;

Remarks

The default value is false.

setValidateMergedAreas(boolean)

Indicates whether validate merged cells before saving the file.

setValidateMergedAreas(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is false.

getMergeAreas()

Indicates whether merge the areas of conditional formatting and validation before saving the file.

getMergeAreas() : boolean;

Remarks

The default value is false.

setMergeAreas(boolean)

Indicates whether merge the areas of conditional formatting and validation before saving the file.

setMergeAreas(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is false.

getCreateDirectory()

If true and the directory does not exist, the directory will be automatically created before saving the file.

getCreateDirectory() : boolean;

Remarks

The default value is false.

setCreateDirectory(boolean)

If true and the directory does not exist, the directory will be automatically created before saving the file.

setCreateDirectory(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is false.

getSortNames()

Indicates whether sorting defined names before saving file.

getSortNames() : boolean;

setSortNames(boolean)

Indicates whether sorting defined names before saving file.

setSortNames(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getSortExternalNames()

Indicates whether sorting external defined names before saving file.

getSortExternalNames() : boolean;

setSortExternalNames(boolean)

Indicates whether sorting external defined names before saving file.

setSortExternalNames(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getRefreshChartCache()

Indicates whether refreshing chart cache data

getRefreshChartCache() : boolean;

setRefreshChartCache(boolean)

Indicates whether refreshing chart cache data

setRefreshChartCache(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

setWarningCallback(IWarningCallback)

Gets or sets warning callback.

setWarningCallback(value: IWarningCallback) : void;

Parameters:

ParameterTypeDescription
valueIWarningCallbackThe value to set.

getWarningCallback()

Gets or sets warning callback.

getWarningCallback() : IWarningCallback;

Returns

IWarningCallback

getUpdateSmartArt()

Indicates whether updating smart art setting. The default value is false.

getUpdateSmartArt() : boolean;

Remarks

Only effects after calling Shape.GetResultOfSmartArt() method and the cached shapes exist in the template file.

setUpdateSmartArt(boolean)

Indicates whether updating smart art setting. The default value is false.

setUpdateSmartArt(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Only effects after calling Shape.GetResultOfSmartArt() method and the cached shapes exist in the template file.

getEncryptDocumentProperties()

Indicates whether encrypt document properties when saving as .xls file. The default value is true.

getEncryptDocumentProperties() : boolean;

Remarks

Only for .xls,xlsx,xlsb and xlsm file.

setEncryptDocumentProperties(boolean)

Indicates whether encrypt document properties when saving as .xls file. The default value is true.

setEncryptDocumentProperties(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Only for .xls,xlsx,xlsb and xlsm file.