XmlLoadOptions

XmlLoadOptions class

Represents the options of loading xml.

Constructors

NameDescription
XmlLoadOptionsRepresents the options of loading xml file.
XmlLoadOptionsRepresents the options of loading xml file.

Properties

NameTypeDescription
StartCellStringGets and sets the start cell. Only works when the file is not speadsheetML or mapping xml to Excel.
IsXmlMapbooleanIndicates whether mapping xml to Excel. The default value is false.
ContainsMultipleWorksheetsbooleanIndicates whether importing xml as multiple worksheets.
ConvertNumericOrDatebooleanIndicates whether converting the value in xml file to numeric or date.
NumberFormatStringGets and sets the format of numeric value.
DateFormatStringGets and sets the format of date value.
IgnoreRootAttributesbooleanIndicates whether ignore attributes of the root element.
LoadFormatintGets the load format. The value of the property is LoadFormat integer constant.
PasswordStringGets and set the password of the workbook.
ParsingFormulaOnOpenbooleanIndicates whether parsing the formula when reading the file. Only applies for Excel Xlsx, Xltx, Xltm and Xlsm file becau
ParsingPivotCachedRecordsbooleanIndicates whether parsing pivot cached records when loading the file. The default value is false. Only applies for Excel
LanguageCodeintGets or sets the user interface language of the Workbook version based on CountryCode that has saved the file. The value
RegionintGets or sets the system regional settings based on CountryCode at the time the file was loaded. The value of the propert
LocaleLocaleGets and sets the Locale used for workbook at the time the file was loaded.
DefaultStyleSettingsDefaultStyleSettingsGets the default style settings for initializing styles of the workbook
StandardFontStringSets the default standard font name NOTE: This member is now obsolete. Instead, please use DefaultStyleSettings. This pr
StandardFontSizefloatSets the default standard font size. NOTE: This member is now obsolete. Instead, please use DefaultStyleSettings. This p
InterruptMonitorAbstractInterruptMonitorGets and sets the interrupt monitor.
IgnoreNotPrintedbooleanIgnore the data which are not printed if directly printing the file Only for xlsx file.
CheckDataValidbooleanCheck whether data is valid in the template file.
CheckExcelRestrictionbooleanWhether check restriction of excel file when user modify cells related objects. For example, excel does not allow inputt
KeepUnparsedDatabooleanWhether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true. For sce
LoadFilterLoadFilterThe filter to denote how to load data.
LightCellsDataHandlerLightCellsDataHandlerThe data handler for processing cells data when reading template file.
MemorySettingintGets or sets the memory usage options. The value of the property is MemorySetting integer constant.
WarningCallbackIWarningCallbackGets or sets warning callback.
AutoFitterOptionsAutoFitterOptionsGets and sets the auto fitter options Only for xlsx ,spreadsheetML file now.
AutoFilterbooleanIndicates whether auto filtering the data when loading the files. Sometimes although autofilter is set, the correspondin
FontConfigsIndividualFontConfigsGets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load.
IgnoreUselessShapesbooleanIndicates whether ignoring useless shapes. Only works for xlsx,xlsb, and xlsm files. There are many overlapping identica
PreservePaddingSpacesInFormulabooleanIndicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting

Methods

NameDescription
setPaperSizeSets the default print paper size from default printer’s setting.

If there is no setting about paper size,MS Excel will |

XmlLoadOptions() (1 of 2)

Represents the options of loading xml file.


XmlLoadOptions(type) (2 of 2)

Represents the options of loading xml file.

ParameterTypeDescription
typeintA LoadFormat value. The load format type.

XmlLoadOptions.StartCell property

Gets and sets the start cell. Only works when the file is not speadsheetML or mapping xml to Excel.

Type: String

XmlLoadOptions.IsXmlMap property

Indicates whether mapping xml to Excel. The default value is false.

Type: boolean

XmlLoadOptions.ContainsMultipleWorksheets property

Indicates whether importing xml as multiple worksheets.

Type: boolean

XmlLoadOptions.ConvertNumericOrDate property

Indicates whether converting the value in xml file to numeric or date.

Type: boolean

XmlLoadOptions.NumberFormat property

Gets and sets the format of numeric value.

Type: String

XmlLoadOptions.DateFormat property

Gets and sets the format of date value.

Type: String

XmlLoadOptions.IgnoreRootAttributes property

Indicates whether ignore attributes of the root element.

Type: boolean

XmlLoadOptions.LoadFormat property

Gets the load format. The value of the property is LoadFormat integer constant.

Type: int

XmlLoadOptions.Password property

Gets and set the password of the workbook.

Type: String

XmlLoadOptions.ParsingFormulaOnOpen property

Indicates whether parsing the formula when reading the file. Only applies for Excel Xlsx, Xltx, Xltm and Xlsm file because the formulas in the files are stored with a string formula.

Type: boolean

XmlLoadOptions.ParsingPivotCachedRecords property

Indicates whether parsing pivot cached records when loading the file. The default value is false. Only applies for Excel Xlsx, Xltx, Xltm , Xlsm and xlsb file

Type: boolean

XmlLoadOptions.LanguageCode property

Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file. The value of the property is CountryCode integer constant.

Type: int

XmlLoadOptions.Region property

Gets or sets the system regional settings based on CountryCode at the time the file was loaded. The value of the property is CountryCode integer constant. If you do not want to use the region saved in the file, please reset it after reading the file.

Type: int

XmlLoadOptions.Locale property

Gets and sets the Locale used for workbook at the time the file was loaded.

Type: Locale

XmlLoadOptions.DefaultStyleSettings property

Gets the default style settings for initializing styles of the workbook

Type: DefaultStyleSettings

XmlLoadOptions.StandardFont property

Sets the default standard font name NOTE: This member is now obsolete. Instead, please use DefaultStyleSettings. This property will be removed 12 months later since March 2022. Aspose apologizes for any inconvenience you may have experienced.

Type: String

XmlLoadOptions.StandardFontSize property

Sets the default standard font size. NOTE: This member is now obsolete. Instead, please use DefaultStyleSettings. This property will be removed 12 months later since March 2022. Aspose apologizes for any inconvenience you may have experienced.

Type: float

XmlLoadOptions.InterruptMonitor property

Gets and sets the interrupt monitor.

Type: AbstractInterruptMonitor

XmlLoadOptions.IgnoreNotPrinted property

Ignore the data which are not printed if directly printing the file Only for xlsx file.

Type: boolean

XmlLoadOptions.CheckDataValid property

Check whether data is valid in the template file.

Type: boolean

XmlLoadOptions.CheckExcelRestriction property

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.

Type: boolean

XmlLoadOptions.KeepUnparsedData property

Whether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true. 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,

Type: boolean

XmlLoadOptions.LoadFilter property

The filter to denote how to load data.

Type: LoadFilter

XmlLoadOptions.LightCellsDataHandler property

The data handler for processing cells data when reading template file.

Type: LightCellsDataHandler

XmlLoadOptions.MemorySetting property

Gets or sets the memory usage options. The value of the property is MemorySetting integer constant.

Type: int

XmlLoadOptions.WarningCallback property

Gets or sets warning callback.

Type: IWarningCallback

XmlLoadOptions.AutoFitterOptions property

Gets and sets the auto fitter options Only for xlsx ,spreadsheetML file now.

Type: AutoFitterOptions

XmlLoadOptions.AutoFilter property

Indicates whether auto filtering the data when loading the files. Sometimes although autofilter is set, the corresponding rows is not hidden in the file. Now only works for SpreadSheetML file.

Type: boolean

XmlLoadOptions.FontConfigs property

Gets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load.

Type: IndividualFontConfigs

XmlLoadOptions.IgnoreUselessShapes property

Indicates whether ignoring useless shapes. 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.

Type: boolean

XmlLoadOptions.PreservePaddingSpacesInFormula property

Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false. After loading workbook from template file with this option, FormulaSettings.PreservePaddingSpaces will be set to the same value with this property.

Type: boolean

setPaperSize(type)

Sets the default print paper size from default printer’s setting.

If there is no setting about paper size,MS Excel will use default printer’s setting.

ParameterTypeDescription
typeintA PaperSizeType value. The default paper size.