XmlLoadOptions
XmlLoadOptions class
Represents the options of loading xml.
class XmlLoadOptions extends LoadOptions;
Constructors
Name | Description |
---|---|
constructor() | Represents the options of loading xml file. |
constructor(LoadOptions) | Constructs from a parent object convertible to this. |
constructor(LoadFormat) | Represents the options of loading xml file. |
Methods
Method | Description |
---|---|
getStartCell() | Gets and sets the start cell. |
setStartCell(string) | Gets and sets the start cell. |
isXmlMap() | Indicates whether mapping xml to Excel. The default value is false. |
setIsXmlMap(boolean) | Indicates whether mapping xml to Excel. The default value is false. |
getContainsMultipleWorksheets() | Indicates whether importing xml as multiple worksheets. |
setContainsMultipleWorksheets(boolean) | Indicates whether importing xml as multiple worksheets. |
getConvertNumericOrDate() | Indicates whether converting the value in xml file to numeric or date. |
setConvertNumericOrDate(boolean) | Indicates whether converting the value in xml file to numeric or date. |
get_NumberFormat() | Gets and sets the format of numeric value. |
setNumberFormat(string) | Gets and sets the format of numeric value. |
get_DateFormat() | Gets and sets the format of date value. |
setDateFormat(string) | Gets and sets the format of date value. |
getIgnoreRootAttributes() | Indicates whether ignore attributes of the root element. |
setIgnoreRootAttributes(boolean) | Indicates whether ignore attributes of the root element. |
isNull() | Checks whether the implementation object is null. |
getLoadFormat() | Gets the load format. |
getPassword() | Gets and set the password of the workbook. |
setPassword(string) | Gets and set the password of the workbook. |
getParsingFormulaOnOpen() | Indicates whether parsing the formula when reading the file. |
setParsingFormulaOnOpen(boolean) | Indicates whether parsing the formula when reading the file. |
getParsingPivotCachedRecords() | Indicates whether parsing pivot cached records when loading the file. The default value is false. |
setParsingPivotCachedRecords(boolean) | Indicates whether parsing pivot cached records when loading the file. The default value is false. |
getLanguageCode() | Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file. |
setLanguageCode(CountryCode) | Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file. |
getRegion() | Gets or sets the system regional settings based on CountryCode at the time the file was loaded. |
setRegion(CountryCode) | Gets or sets the system regional settings based on CountryCode at the time the file was loaded. |
getDefaultStyleSettings() | Gets the default style settings for initializing styles of the workbook |
getInterruptMonitor() | Gets and sets the interrupt monitor. |
setInterruptMonitor(AbstractInterruptMonitor) | Gets and sets the interrupt monitor. |
getIgnoreNotPrinted() | Ignore the data which are not printed if directly printing the file |
setIgnoreNotPrinted(boolean) | Ignore the data which are not printed if directly printing the file |
getCheckDataValid() | Check whether data is valid in the template file. |
setCheckDataValid(boolean) | Check whether data is valid in the template file. |
getCheckExcelRestriction() | 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 such as by Cell.PutValue(string), if this property is true, you will get an Exception. If this property is false, we will accept your input string value as the cell’s value so that later you can output the complete string value for other file formats such as CSV. However, if you have set such kind of value that is invalid for excel file format, you should not save the workbook as excel file format later. Otherwise there may be unexpected error for the generated excel file. |
setCheckExcelRestriction(boolean) | 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 such as by Cell.PutValue(string), if this property is true, you will get an Exception. If this property is false, we will accept your input string value as the cell’s value so that later you can output the complete string value for other file formats such as CSV. However, if you have set such kind of value that is invalid for excel file format, you should not save the workbook as excel file format later. Otherwise there may be unexpected error for the generated excel file. |
getKeepUnparsedData() | Whether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true. |
setKeepUnparsedData(boolean) | Whether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true. |
getLoadFilter() | The filter to denote how to load data. |
setLoadFilter(LoadFilter) | The filter to denote how to load data. |
getLightCellsDataHandler() | The data handler for processing cells data when reading template file. |
setLightCellsDataHandler(LightCellsDataHandler) | The data handler for processing cells data when reading template file. |
getMemorySetting() | Gets or sets the memory usage options. |
setMemorySetting(MemorySetting) | Gets or sets the memory usage options. |
setWarningCallback(IWarningCallback) | Gets or sets warning callback. |
getWarningCallback() | Gets or sets warning callback. |
getAutoFitterOptions() | Gets and sets the auto fitter options |
setAutoFitterOptions(AutoFitterOptions) | Gets and sets the auto fitter options |
getAutoFilter() | Indicates whether auto filtering the data when loading the files. |
setAutoFilter(boolean) | Indicates whether auto filtering the data when loading the files. |
getFontConfigs() | Gets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load. |
setFontConfigs(IndividualFontConfigs) | Gets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load. |
getIgnoreUselessShapes() | Indicates whether ignoring useless shapes. |
setIgnoreUselessShapes(boolean) | Indicates whether ignoring useless shapes. |
getPreservePaddingSpacesInFormula() | Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false. |
setPreservePaddingSpacesInFormula(boolean) | Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false. |
setPaperSize(PaperSizeType) | Sets the default print paper size from default printer’s setting. |
constructor()
Represents the options of loading xml file.
constructor();
constructor(LoadOptions)
Constructs from a parent object convertible to this.
constructor(obj: LoadOptions);
Parameters:
Parameter | Type | Description |
---|---|---|
obj | LoadOptions | The parent object. |
constructor(LoadFormat)
Represents the options of loading xml file.
constructor(type: LoadFormat);
Parameters:
Parameter | Type | Description |
---|---|---|
type | LoadFormat | The load format type. |
getStartCell()
Gets and sets the start cell.
getStartCell() : string;
Remarks
Only works when the file is not speadsheetML or mapping xml to Excel.
setStartCell(string)
Gets and sets the start cell.
setStartCell(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
Remarks
Only works when the file is not speadsheetML or mapping xml to Excel.
isXmlMap()
Indicates whether mapping xml to Excel. The default value is false.
isXmlMap() : boolean;
setIsXmlMap(boolean)
Indicates whether mapping xml to Excel. The default value is false.
setIsXmlMap(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getContainsMultipleWorksheets()
Indicates whether importing xml as multiple worksheets.
getContainsMultipleWorksheets() : boolean;
setContainsMultipleWorksheets(boolean)
Indicates whether importing xml as multiple worksheets.
setContainsMultipleWorksheets(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getConvertNumericOrDate()
Indicates whether converting the value in xml file to numeric or date.
getConvertNumericOrDate() : boolean;
setConvertNumericOrDate(boolean)
Indicates whether converting the value in xml file to numeric or date.
setConvertNumericOrDate(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
get_NumberFormat()
Gets and sets the format of numeric value.
get_NumberFormat() : string;
setNumberFormat(string)
Gets and sets the format of numeric value.
setNumberFormat(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
get_DateFormat()
Gets and sets the format of date value.
get_DateFormat() : string;
setDateFormat(string)
Gets and sets the format of date value.
setDateFormat(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getIgnoreRootAttributes()
Indicates whether ignore attributes of the root element.
getIgnoreRootAttributes() : boolean;
setIgnoreRootAttributes(boolean)
Indicates whether ignore attributes of the root element.
setIgnoreRootAttributes(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isNull()
Checks whether the implementation object is null.
isNull() : boolean;
getLoadFormat()
Gets the load format.
getLoadFormat() : LoadFormat;
Returns
getPassword()
Gets and set the password of the workbook.
getPassword() : string;
setPassword(string)
Gets and set the password of the workbook.
setPassword(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getParsingFormulaOnOpen()
Indicates whether parsing the formula when reading the file.
getParsingFormulaOnOpen() : boolean;
Remarks
Only applies for Excel Xlsx, Xltx, Xltm and Xlsm file because the formulas in the files are stored with a string formula.
setParsingFormulaOnOpen(boolean)
Indicates whether parsing the formula when reading the file.
setParsingFormulaOnOpen(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
Remarks
Only applies for Excel Xlsx, Xltx, Xltm and Xlsm file because the formulas in the files are stored with a string formula.
getParsingPivotCachedRecords()
Indicates whether parsing pivot cached records when loading the file. The default value is false.
getParsingPivotCachedRecords() : boolean;
Remarks
Only applies for Excel Xlsx, Xltx, Xltm , Xlsm and xlsb file
setParsingPivotCachedRecords(boolean)
Indicates whether parsing pivot cached records when loading the file. The default value is false.
setParsingPivotCachedRecords(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
Remarks
Only applies for Excel Xlsx, Xltx, Xltm , Xlsm and xlsb file
getLanguageCode()
Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.
getLanguageCode() : CountryCode;
Returns
setLanguageCode(CountryCode)
Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.
setLanguageCode(value: CountryCode) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | CountryCode | The value to set. |
getRegion()
Gets or sets the system regional settings based on CountryCode at the time the file was loaded.
getRegion() : CountryCode;
Returns
Remarks
If you do not want to use the region saved in the file, please reset it after reading the file.
setRegion(CountryCode)
Gets or sets the system regional settings based on CountryCode at the time the file was loaded.
setRegion(value: CountryCode) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | CountryCode | The value to set. |
Remarks
If you do not want to use the region saved in the file, please reset it after reading the file.
getDefaultStyleSettings()
Gets the default style settings for initializing styles of the workbook
getDefaultStyleSettings() : DefaultStyleSettings;
Returns
getInterruptMonitor()
Gets and sets the interrupt monitor.
getInterruptMonitor() : AbstractInterruptMonitor;
Returns
setInterruptMonitor(AbstractInterruptMonitor)
Gets and sets the interrupt monitor.
setInterruptMonitor(value: AbstractInterruptMonitor) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | AbstractInterruptMonitor | The value to set. |
getIgnoreNotPrinted()
Ignore the data which are not printed if directly printing the file
getIgnoreNotPrinted() : boolean;
Remarks
Only for xlsx file.
setIgnoreNotPrinted(boolean)
Ignore the data which are not printed if directly printing the file
setIgnoreNotPrinted(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
Remarks
Only for xlsx file.
getCheckDataValid()
Check whether data is valid in the template file.
getCheckDataValid() : boolean;
setCheckDataValid(boolean)
Check whether data is valid in the template file.
setCheckDataValid(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getCheckExcelRestriction()
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 such as by Cell.PutValue(string), if this property is true, you will get an Exception. If this property is false, we will accept your input string value as the cell’s value so that later you can output the complete string value for other file formats such as CSV. However, if you have set such kind of value that is invalid for excel file format, you should not save the workbook as excel file format later. Otherwise there may be unexpected error for the generated excel file.
getCheckExcelRestriction() : boolean;
setCheckExcelRestriction(boolean)
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 such as by Cell.PutValue(string), if this property is true, you will get an Exception. If this property is false, we will accept your input string value as the cell’s value so that later you can output the complete string value for other file formats such as CSV. However, if you have set such kind of value that is invalid for excel file format, you should not save the workbook as excel file format later. Otherwise there may be unexpected error for the generated excel file.
setCheckExcelRestriction(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getKeepUnparsedData()
Whether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true.
getKeepUnparsedData() : boolean;
Remarks
For scenarios that user only needs to read some contents from template file and does not need to save the workbook back, set this property as false may improve performance, especially when using it together with some kind of LoadFilter,
setKeepUnparsedData(boolean)
Whether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true.
setKeepUnparsedData(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
Remarks
For scenarios that user only needs to read some contents from template file and does not need to save the workbook back, set this property as false may improve performance, especially when using it together with some kind of LoadFilter,
getLoadFilter()
The filter to denote how to load data.
getLoadFilter() : LoadFilter;
Returns
setLoadFilter(LoadFilter)
The filter to denote how to load data.
setLoadFilter(value: LoadFilter) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | LoadFilter | The value to set. |
getLightCellsDataHandler()
The data handler for processing cells data when reading template file.
getLightCellsDataHandler() : LightCellsDataHandler;
Returns
setLightCellsDataHandler(LightCellsDataHandler)
The data handler for processing cells data when reading template file.
setLightCellsDataHandler(value: LightCellsDataHandler) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | LightCellsDataHandler | The value to set. |
getMemorySetting()
Gets or sets the memory usage options.
getMemorySetting() : MemorySetting;
Returns
setMemorySetting(MemorySetting)
Gets or sets the memory usage options.
setMemorySetting(value: MemorySetting) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | MemorySetting | The value to set. |
setWarningCallback(IWarningCallback)
Gets or sets warning callback.
setWarningCallback(value: IWarningCallback) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | IWarningCallback | The value to set. |
getWarningCallback()
Gets or sets warning callback.
getWarningCallback() : IWarningCallback;
Returns
getAutoFitterOptions()
Gets and sets the auto fitter options
getAutoFitterOptions() : AutoFitterOptions;
Returns
Remarks
Only for xlsx ,spreadsheetML file now.
setAutoFitterOptions(AutoFitterOptions)
Gets and sets the auto fitter options
setAutoFitterOptions(value: AutoFitterOptions) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | AutoFitterOptions | The value to set. |
Remarks
Only for xlsx ,spreadsheetML file now.
getAutoFilter()
Indicates whether auto filtering the data when loading the files.
getAutoFilter() : boolean;
Remarks
Sometimes although autofilter is set, the corresponding rows is not hidden in the file. Now only works for SpreadSheetML file.
setAutoFilter(boolean)
Indicates whether auto filtering the data when loading the files.
setAutoFilter(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
Remarks
Sometimes although autofilter is set, the corresponding rows is not hidden in the file. Now only works for SpreadSheetML file.
getFontConfigs()
Gets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load.
getFontConfigs() : IndividualFontConfigs;
Returns
setFontConfigs(IndividualFontConfigs)
Gets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load.
setFontConfigs(value: IndividualFontConfigs) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | IndividualFontConfigs | The value to set. |
getIgnoreUselessShapes()
Indicates whether ignoring useless shapes.
getIgnoreUselessShapes() : boolean;
Remarks
Only works for xlsx,xlsb, and xlsm files. There are many overlapping identical shapes which are useless in some files, we can ingore them when loading files.
setIgnoreUselessShapes(boolean)
Indicates whether ignoring useless shapes.
setIgnoreUselessShapes(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
Remarks
Only works for xlsx,xlsb, and xlsm files. There are many overlapping identical shapes which are useless in some files, we can ingore them when loading files.
getPreservePaddingSpacesInFormula()
Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.
getPreservePaddingSpacesInFormula() : boolean;
Remarks
After loading workbook from template file with this option, FormulaSettings.PreservePaddingSpaces will be set to the same value with this property.
setPreservePaddingSpacesInFormula(boolean)
Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.
setPreservePaddingSpacesInFormula(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
Remarks
After loading workbook from template file with this option, FormulaSettings.PreservePaddingSpaces will be set to the same value with this property.
setPaperSize(PaperSizeType)
Sets the default print paper size from default printer’s setting.
setPaperSize(type: PaperSizeType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
type | PaperSizeType | The default paper size. |
Remarks
If there is no setting about paper size,MS Excel will use default printer’s setting.