TxtLoadOptions

TxtLoadOptions class

Represents the options for loading text file.

class TxtLoadOptions extends AbstractTextLoadOptions;

Constructors

ConstructorDescription
constructor()Creates the options for loading text file.
constructor(AbstractTextLoadOptions)Constructs from a parent object convertible to this.
constructor(LoadFormat)Creates the options for loading text file.

Properties

PropertyTypeDescription
separatorstringGets and sets character separator of text file.
separatorStringstringGets and sets a string value as separator.
isMultiEncodedbooleanTrue means that the file contains several encoding.
hasFormulabooleanIndicates whether the text is formula if it starts with “=”.
hasTextQualifierbooleanWhether there is text qualifier for cell value. Default is true.
textQualifierstringSpecifies the text qualifier for cell values. Default qualifier is ‘"’.
treatConsecutiveDelimitersAsOnebooleanWhether consecutive delimiters should be treated as one.
treatQuotePrefixAsValuebooleanIndicates whether the leading single quote sign should be taken as part of the value of one cell. Default is true. If it is false, the leading single quote will be removed from corresponding cell’s value and Style.QuotePrefix will be set as true for the cell.
extendToNextSheetbooleanWhether extends data to next sheet when the rows or columns of data exceed limit. Default is false.
headerRowsCountnumberThe count of header rows to be repeated for extended sheets.
headerColumnsCountnumberThe count of header columns to be repeated for extended sheets.
maxRowCountnumberThe maximum count of rows to be imported for one sheet.
maxColumnCountnumberThe maximum count of columns to be imported for one sheet.
loadFormatLoadFormatReadonly. Gets the load format.
passwordstringGets and set the password of the workbook.
parsingFormulaOnOpenbooleanIndicates whether parsing the formula when reading the file.
parsingPivotCachedRecordsbooleanIndicates whether parsing pivot cached records when loading the file. The default value is false.
languageCodeCountryCodeGets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.
regionCountryCodeGets or sets the regional settings used for the Workbook that will be loaded.
defaultStyleSettingsDefaultStyleSettingsReadonly. Gets the default style settings for initializing styles of the workbook
interruptMonitorAbstractInterruptMonitorGets and sets the interrupt monitor.
ignoreNotPrintedbooleanIgnore the data which are not printed if directly printing the 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 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.
keepUnparsedDatabooleanWhether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true.
loadFilterLoadFilterThe filter to denote how to load data.
lightCellsDataHandlerLightCellsDataHandlerThe data handler for processing cells data when reading template file.
memorySettingMemorySettingGets or sets the memory mode for loaded workbook.
warningCallbackIWarningCallbackGets or sets warning callback.
autoFitterOptionsAutoFitterOptionsGets and sets the auto fitter options
autoFilterbooleanIndicates whether auto filtering the data when loading the files.
fontConfigsIndividualFontConfigsGets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load.
ignoreUselessShapesbooleanIndicates whether ignoring useless shapes.
preservePaddingSpacesInFormulabooleanIndicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.
encodingEncodingTypeGets and sets the default encoding. Only applies for csv file.
loadStyleStrategyTxtLoadStyleStrategyIndicates the strategy to apply style for parsed values when converting string value to number or datetime.
convertNumericDatabooleanGets or sets a value that indicates whether the string in text file is converted to numeric data. Default value is true.
convertDateTimeDatabooleanGets or sets a value that indicates whether the string in text file is converted to date data. Default value is true.
keepPrecisionbooleanIndicates whether not parsing a string value if the length is 15.

Methods

MethodDescription
getSeparator()@deprecated. Please use the ‘separator’ property instead. Gets and sets character separator of text file.
setSeparator(string)@deprecated. Please use the ‘separator’ property instead. Gets and sets character separator of text file.
getSeparatorString()@deprecated. Please use the ‘separatorString’ property instead. Gets and sets a string value as separator.
setSeparatorString(string)@deprecated. Please use the ‘separatorString’ property instead. Gets and sets a string value as separator.
isMultiEncoded()@deprecated. Please use the ‘isMultiEncoded’ property instead. True means that the file contains several encoding.
setIsMultiEncoded(boolean)@deprecated. Please use the ‘isMultiEncoded’ property instead. True means that the file contains several encoding.
getHasFormula()@deprecated. Please use the ‘hasFormula’ property instead. Indicates whether the text is formula if it starts with “=”.
setHasFormula(boolean)@deprecated. Please use the ‘hasFormula’ property instead. Indicates whether the text is formula if it starts with “=”.
getHasTextQualifier()@deprecated. Please use the ‘hasTextQualifier’ property instead. Whether there is text qualifier for cell value. Default is true.
setHasTextQualifier(boolean)@deprecated. Please use the ‘hasTextQualifier’ property instead. Whether there is text qualifier for cell value. Default is true.
getTextQualifier()@deprecated. Please use the ’textQualifier’ property instead. Specifies the text qualifier for cell values. Default qualifier is ‘"’.
setTextQualifier(string)@deprecated. Please use the ’textQualifier’ property instead. Specifies the text qualifier for cell values. Default qualifier is ‘"’.
getTreatConsecutiveDelimitersAsOne()@deprecated. Please use the ’treatConsecutiveDelimitersAsOne’ property instead. Whether consecutive delimiters should be treated as one.
setTreatConsecutiveDelimitersAsOne(boolean)@deprecated. Please use the ’treatConsecutiveDelimitersAsOne’ property instead. Whether consecutive delimiters should be treated as one.
getTreatQuotePrefixAsValue()@deprecated. Please use the ’treatQuotePrefixAsValue’ property instead. Indicates whether the leading single quote sign should be taken as part of the value of one cell. Default is true. If it is false, the leading single quote will be removed from corresponding cell’s value and Style.QuotePrefix will be set as true for the cell.
setTreatQuotePrefixAsValue(boolean)@deprecated. Please use the ’treatQuotePrefixAsValue’ property instead. Indicates whether the leading single quote sign should be taken as part of the value of one cell. Default is true. If it is false, the leading single quote will be removed from corresponding cell’s value and Style.QuotePrefix will be set as true for the cell.
getExtendToNextSheet()@deprecated. Please use the ’extendToNextSheet’ property instead. Whether extends data to next sheet when the rows or columns of data exceed limit. Default is false.
setExtendToNextSheet(boolean)@deprecated. Please use the ’extendToNextSheet’ property instead. Whether extends data to next sheet when the rows or columns of data exceed limit. Default is false.
getHeaderRowsCount()@deprecated. Please use the ‘headerRowsCount’ property instead. The count of header rows to be repeated for extended sheets.
setHeaderRowsCount(number)@deprecated. Please use the ‘headerRowsCount’ property instead. The count of header rows to be repeated for extended sheets.
getHeaderColumnsCount()@deprecated. Please use the ‘headerColumnsCount’ property instead. The count of header columns to be repeated for extended sheets.
setHeaderColumnsCount(number)@deprecated. Please use the ‘headerColumnsCount’ property instead. The count of header columns to be repeated for extended sheets.
getMaxRowCount()@deprecated. Please use the ‘maxRowCount’ property instead. The maximum count of rows to be imported for one sheet.
setMaxRowCount(number)@deprecated. Please use the ‘maxRowCount’ property instead. The maximum count of rows to be imported for one sheet.
getMaxColumnCount()@deprecated. Please use the ‘maxColumnCount’ property instead. The maximum count of columns to be imported for one sheet.
setMaxColumnCount(number)@deprecated. Please use the ‘maxColumnCount’ property instead. The maximum count of columns to be imported for one sheet.
isNull()Checks whether the implementation object is null.
getLoadFormat()@deprecated. Please use the ’loadFormat’ property instead. Gets the load format.
getPassword()@deprecated. Please use the ‘password’ property instead. Gets and set the password of the workbook.
setPassword(string)@deprecated. Please use the ‘password’ property instead. Gets and set the password of the workbook.
getParsingFormulaOnOpen()@deprecated. Please use the ‘parsingFormulaOnOpen’ property instead. Indicates whether parsing the formula when reading the file.
setParsingFormulaOnOpen(boolean)@deprecated. Please use the ‘parsingFormulaOnOpen’ property instead. Indicates whether parsing the formula when reading the file.
getParsingPivotCachedRecords()@deprecated. Please use the ‘parsingPivotCachedRecords’ property instead. Indicates whether parsing pivot cached records when loading the file. The default value is false.
setParsingPivotCachedRecords(boolean)@deprecated. Please use the ‘parsingPivotCachedRecords’ property instead. Indicates whether parsing pivot cached records when loading the file. The default value is false.
getLanguageCode()@deprecated. Please use the ’languageCode’ property instead. Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.
setLanguageCode(CountryCode)@deprecated. Please use the ’languageCode’ property instead. Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.
getRegion()@deprecated. Please use the ‘region’ property instead. Gets or sets the regional settings used for the Workbook that will be loaded.
setRegion(CountryCode)@deprecated. Please use the ‘region’ property instead. Gets or sets the regional settings used for the Workbook that will be loaded.
getDefaultStyleSettings()@deprecated. Please use the ‘defaultStyleSettings’ property instead. Gets the default style settings for initializing styles of the workbook
getInterruptMonitor()@deprecated. Please use the ‘interruptMonitor’ property instead. Gets and sets the interrupt monitor.
setInterruptMonitor(AbstractInterruptMonitor)@deprecated. Please use the ‘interruptMonitor’ property instead. Gets and sets the interrupt monitor.
getIgnoreNotPrinted()@deprecated. Please use the ‘ignoreNotPrinted’ property instead. Ignore the data which are not printed if directly printing the file
setIgnoreNotPrinted(boolean)@deprecated. Please use the ‘ignoreNotPrinted’ property instead. Ignore the data which are not printed if directly printing the file
getCheckDataValid()@deprecated. Please use the ‘checkDataValid’ property instead. Check whether data is valid in the template file.
setCheckDataValid(boolean)@deprecated. Please use the ‘checkDataValid’ property instead. Check whether data is valid in the template file.
getCheckExcelRestriction()@deprecated. Please use the ‘checkExcelRestriction’ property instead. 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)@deprecated. Please use the ‘checkExcelRestriction’ property instead. 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()@deprecated. Please use the ‘keepUnparsedData’ property instead. Whether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true.
setKeepUnparsedData(boolean)@deprecated. Please use the ‘keepUnparsedData’ property instead. Whether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true.
getLoadFilter()@deprecated. Please use the ’loadFilter’ property instead. The filter to denote how to load data.
setLoadFilter(LoadFilter)@deprecated. Please use the ’loadFilter’ property instead. The filter to denote how to load data.
getLightCellsDataHandler()@deprecated. Please use the ’lightCellsDataHandler’ property instead. The data handler for processing cells data when reading template file.
setLightCellsDataHandler(LightCellsDataHandler)@deprecated. Please use the ’lightCellsDataHandler’ property instead. The data handler for processing cells data when reading template file.
getMemorySetting()@deprecated. Please use the ‘memorySetting’ property instead. Gets or sets the memory mode for loaded workbook.
setMemorySetting(MemorySetting)@deprecated. Please use the ‘memorySetting’ property instead. Gets or sets the memory mode for loaded workbook.
setWarningCallback(IWarningCallback)@deprecated. Please use the ‘warningCallback’ property instead. Gets or sets warning callback.
getWarningCallback()@deprecated. Please use the ‘warningCallback’ property instead. Gets or sets warning callback.
getAutoFitterOptions()@deprecated. Please use the ‘autoFitterOptions’ property instead. Gets and sets the auto fitter options
setAutoFitterOptions(AutoFitterOptions)@deprecated. Please use the ‘autoFitterOptions’ property instead. Gets and sets the auto fitter options
getAutoFilter()@deprecated. Please use the ‘autoFilter’ property instead. Indicates whether auto filtering the data when loading the files.
setAutoFilter(boolean)@deprecated. Please use the ‘autoFilter’ property instead. Indicates whether auto filtering the data when loading the files.
getFontConfigs()@deprecated. Please use the ‘fontConfigs’ property instead. Gets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load.
setFontConfigs(IndividualFontConfigs)@deprecated. Please use the ‘fontConfigs’ property instead. Gets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load.
getIgnoreUselessShapes()@deprecated. Please use the ‘ignoreUselessShapes’ property instead. Indicates whether ignoring useless shapes.
setIgnoreUselessShapes(boolean)@deprecated. Please use the ‘ignoreUselessShapes’ property instead. Indicates whether ignoring useless shapes.
getPreservePaddingSpacesInFormula()@deprecated. Please use the ‘preservePaddingSpacesInFormula’ property instead. 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)@deprecated. Please use the ‘preservePaddingSpacesInFormula’ property instead. 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.
getEncoding()@deprecated. Please use the ’encoding’ property instead. Gets and sets the default encoding. Only applies for csv file.
setEncoding(EncodingType)@deprecated. Please use the ’encoding’ property instead. Gets and sets the default encoding. Only applies for csv file.
getLoadStyleStrategy()@deprecated. Please use the ’loadStyleStrategy’ property instead. Indicates the strategy to apply style for parsed values when converting string value to number or datetime.
setLoadStyleStrategy(TxtLoadStyleStrategy)@deprecated. Please use the ’loadStyleStrategy’ property instead. Indicates the strategy to apply style for parsed values when converting string value to number or datetime.
getConvertNumericData()@deprecated. Please use the ‘convertNumericData’ property instead. Gets or sets a value that indicates whether the string in text file is converted to numeric data. Default value is true.
setConvertNumericData(boolean)@deprecated. Please use the ‘convertNumericData’ property instead. Gets or sets a value that indicates whether the string in text file is converted to numeric data. Default value is true.
getConvertDateTimeData()@deprecated. Please use the ‘convertDateTimeData’ property instead. Gets or sets a value that indicates whether the string in text file is converted to date data. Default value is true.
setConvertDateTimeData(boolean)@deprecated. Please use the ‘convertDateTimeData’ property instead. Gets or sets a value that indicates whether the string in text file is converted to date data. Default value is true.
getKeepPrecision()@deprecated. Please use the ‘keepPrecision’ property instead. Indicates whether not parsing a string value if the length is 15.
setKeepPrecision(boolean)@deprecated. Please use the ‘keepPrecision’ property instead. Indicates whether not parsing a string value if the length is 15.

constructor()

Creates the options for loading text file.

constructor();

Remarks

The default load file type is CSV .

constructor(AbstractTextLoadOptions)

Constructs from a parent object convertible to this.

constructor(obj: AbstractTextLoadOptions);

Parameters:

ParameterTypeDescription
objAbstractTextLoadOptionsThe parent object.

constructor(LoadFormat)

Creates the options for loading text file.

constructor(loadFormat: LoadFormat);

Parameters:

ParameterTypeDescription
loadFormatLoadFormatThe loading format

separator

Gets and sets character separator of text file.

separator : string;

separatorString

Gets and sets a string value as separator.

separatorString : string;

isMultiEncoded

True means that the file contains several encoding.

isMultiEncoded : boolean;

hasFormula

Indicates whether the text is formula if it starts with “=”.

hasFormula : boolean;

hasTextQualifier

Whether there is text qualifier for cell value. Default is true.

hasTextQualifier : boolean;

textQualifier

Specifies the text qualifier for cell values. Default qualifier is ‘"’.

textQualifier : string;

Remarks

When setting this property, HasTextQualifier will become true automatically.

treatConsecutiveDelimitersAsOne

Whether consecutive delimiters should be treated as one.

treatConsecutiveDelimitersAsOne : boolean;

treatQuotePrefixAsValue

Indicates whether the leading single quote sign should be taken as part of the value of one cell. Default is true. If it is false, the leading single quote will be removed from corresponding cell’s value and Style.QuotePrefix will be set as true for the cell.

treatQuotePrefixAsValue : boolean;

extendToNextSheet

Whether extends data to next sheet when the rows or columns of data exceed limit. Default is false.

extendToNextSheet : boolean;

Remarks

If this property is true, extra data will be put into next sheet behind current one (if current sheet is the last one, new sheet will be appended to current workbook). If this property is false, the data exceeding limit will be ignored.

headerRowsCount

The count of header rows to be repeated for extended sheets.

headerRowsCount : number;

Remarks

The header rows specified by this property will be duplicated for those extended sheets. This property only takes effect when ExtendToNextSheet is true.

headerColumnsCount

The count of header columns to be repeated for extended sheets.

headerColumnsCount : number;

Remarks

The header columns specified by this property will be duplicated for those extended sheets. This property only takes effect when ExtendToNextSheet is true.

maxRowCount

The maximum count of rows to be imported for one sheet.

maxRowCount : number;

Remarks

Those rows exceeding this limit will be ignored or extended to next sheet according to ExtendToNextSheet. This count includes the header rows(HeaderRowsCount). The maximum allowed value of it is the row limit of corresponding file format, such as for xlsx file it 1048576. If this property has not been specified or the specified value is not positive, then the maximum limit will be used too.

maxColumnCount

The maximum count of columns to be imported for one sheet.

maxColumnCount : number;

Remarks

Those columns exceeding this limit will be ignored or extended to next sheet according to ExtendToNextSheet. This count includes the header columns(HeaderColumnsCount). The maximum value of it is the column limit of corresponding file format, such as for xlsx file it 16384. If this property has not been specified or the specified value is not positive, then the maximum limit will be used too.

loadFormat

Readonly. Gets the load format.

loadFormat : LoadFormat;

password

Gets and set the password of the workbook.

password : string;

parsingFormulaOnOpen

Indicates whether parsing the formula when reading the file.

parsingFormulaOnOpen : boolean;

Remarks

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

parsingPivotCachedRecords

Indicates whether parsing pivot cached records when loading the file. The default value is false.

parsingPivotCachedRecords : boolean;

Remarks

Only applies for Excel Xlsx, Xltx, Xltm , Xlsm and xlsb file

languageCode

Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.

languageCode : CountryCode;

region

Gets or sets the regional settings used for the Workbook that will be loaded.

region : CountryCode;

Remarks

The regional settings may be used for initializing some features for the workbook such as fonts, themes, and so on. For text based file formats, such as CSV, HTML, …, the regional setting also will be used to detect number formats and parse text values to numeric or datetime values for cells. This setting will be kept for the instantiated workbook later, that is, WorkbookSettings.Region of the workbook will use the same region with this property.

defaultStyleSettings

Readonly. Gets the default style settings for initializing styles of the workbook

defaultStyleSettings : DefaultStyleSettings;

interruptMonitor

Gets and sets the interrupt monitor.

interruptMonitor : AbstractInterruptMonitor;

ignoreNotPrinted

Ignore the data which are not printed if directly printing the file

ignoreNotPrinted : boolean;

Remarks

Only for xlsx file.

checkDataValid

Check whether data is valid in the template file.

checkDataValid : boolean;

checkExcelRestriction

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.

checkExcelRestriction : boolean;

keepUnparsedData

Whether keep the unparsed data in memory for the Workbook when it is loaded from template file. Default is true.

keepUnparsedData : 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,

loadFilter

The filter to denote how to load data.

loadFilter : LoadFilter;

lightCellsDataHandler

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

lightCellsDataHandler : LightCellsDataHandler;

memorySetting

Gets or sets the memory mode for loaded workbook.

memorySetting : MemorySetting;

Remarks

For more details about memory mode, please see Cells.MemorySetting.

warningCallback

Gets or sets warning callback.

warningCallback : IWarningCallback;

autoFitterOptions

Gets and sets the auto fitter options

autoFitterOptions : AutoFitterOptions;

Remarks

Only for xlsx ,spreadsheetML file now.

autoFilter

Indicates whether auto filtering the data when loading the files.

autoFilter : boolean;

Remarks

Sometimes although autofilter is set, the corresponding rows is not hidden in the file. Now only works for SpreadSheetML file.

fontConfigs

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

fontConfigs : IndividualFontConfigs;

ignoreUselessShapes

Indicates whether ignoring useless shapes.

ignoreUselessShapes : 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.

preservePaddingSpacesInFormula

Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.

preservePaddingSpacesInFormula : boolean;

Remarks

After loading workbook from template file with this option, FormulaSettings.PreservePaddingSpaces will be set to the same value with this property.

encoding

Gets and sets the default encoding. Only applies for csv file.

encoding : EncodingType;

loadStyleStrategy

Indicates the strategy to apply style for parsed values when converting string value to number or datetime.

loadStyleStrategy : TxtLoadStyleStrategy;

convertNumericData

Gets or sets a value that indicates whether the string in text file is converted to numeric data. Default value is true.

convertNumericData : boolean;

convertDateTimeData

Gets or sets a value that indicates whether the string in text file is converted to date data. Default value is true.

convertDateTimeData : boolean;

keepPrecision

Indicates whether not parsing a string value if the length is 15.

keepPrecision : boolean;

getSeparator()

@deprecated. Please use the ‘separator’ property instead. Gets and sets character separator of text file.

getSeparator() : string;

setSeparator(string)

@deprecated. Please use the ‘separator’ property instead. Gets and sets character separator of text file.

setSeparator(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getSeparatorString()

@deprecated. Please use the ‘separatorString’ property instead. Gets and sets a string value as separator.

getSeparatorString() : string;

setSeparatorString(string)

@deprecated. Please use the ‘separatorString’ property instead. Gets and sets a string value as separator.

setSeparatorString(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

isMultiEncoded()

@deprecated. Please use the ‘isMultiEncoded’ property instead. True means that the file contains several encoding.

isMultiEncoded() : boolean;

setIsMultiEncoded(boolean)

@deprecated. Please use the ‘isMultiEncoded’ property instead. True means that the file contains several encoding.

setIsMultiEncoded(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getHasFormula()

@deprecated. Please use the ‘hasFormula’ property instead. Indicates whether the text is formula if it starts with “=”.

getHasFormula() : boolean;

setHasFormula(boolean)

@deprecated. Please use the ‘hasFormula’ property instead. Indicates whether the text is formula if it starts with “=”.

setHasFormula(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getHasTextQualifier()

@deprecated. Please use the ‘hasTextQualifier’ property instead. Whether there is text qualifier for cell value. Default is true.

getHasTextQualifier() : boolean;

setHasTextQualifier(boolean)

@deprecated. Please use the ‘hasTextQualifier’ property instead. Whether there is text qualifier for cell value. Default is true.

setHasTextQualifier(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getTextQualifier()

@deprecated. Please use the ’textQualifier’ property instead. Specifies the text qualifier for cell values. Default qualifier is ‘"’.

getTextQualifier() : string;

Remarks

When setting this property, HasTextQualifier will become true automatically.

setTextQualifier(string)

@deprecated. Please use the ’textQualifier’ property instead. Specifies the text qualifier for cell values. Default qualifier is ‘"’.

setTextQualifier(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

Remarks

When setting this property, HasTextQualifier will become true automatically.

getTreatConsecutiveDelimitersAsOne()

@deprecated. Please use the ’treatConsecutiveDelimitersAsOne’ property instead. Whether consecutive delimiters should be treated as one.

getTreatConsecutiveDelimitersAsOne() : boolean;

setTreatConsecutiveDelimitersAsOne(boolean)

@deprecated. Please use the ’treatConsecutiveDelimitersAsOne’ property instead. Whether consecutive delimiters should be treated as one.

setTreatConsecutiveDelimitersAsOne(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getTreatQuotePrefixAsValue()

@deprecated. Please use the ’treatQuotePrefixAsValue’ property instead. Indicates whether the leading single quote sign should be taken as part of the value of one cell. Default is true. If it is false, the leading single quote will be removed from corresponding cell’s value and Style.QuotePrefix will be set as true for the cell.

getTreatQuotePrefixAsValue() : boolean;

setTreatQuotePrefixAsValue(boolean)

@deprecated. Please use the ’treatQuotePrefixAsValue’ property instead. Indicates whether the leading single quote sign should be taken as part of the value of one cell. Default is true. If it is false, the leading single quote will be removed from corresponding cell’s value and Style.QuotePrefix will be set as true for the cell.

setTreatQuotePrefixAsValue(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getExtendToNextSheet()

@deprecated. Please use the ’extendToNextSheet’ property instead. Whether extends data to next sheet when the rows or columns of data exceed limit. Default is false.

getExtendToNextSheet() : boolean;

Remarks

If this property is true, extra data will be put into next sheet behind current one (if current sheet is the last one, new sheet will be appended to current workbook). If this property is false, the data exceeding limit will be ignored.

setExtendToNextSheet(boolean)

@deprecated. Please use the ’extendToNextSheet’ property instead. Whether extends data to next sheet when the rows or columns of data exceed limit. Default is false.

setExtendToNextSheet(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

If this property is true, extra data will be put into next sheet behind current one (if current sheet is the last one, new sheet will be appended to current workbook). If this property is false, the data exceeding limit will be ignored.

getHeaderRowsCount()

@deprecated. Please use the ‘headerRowsCount’ property instead. The count of header rows to be repeated for extended sheets.

getHeaderRowsCount() : number;

Remarks

The header rows specified by this property will be duplicated for those extended sheets. This property only takes effect when ExtendToNextSheet is true.

setHeaderRowsCount(number)

@deprecated. Please use the ‘headerRowsCount’ property instead. The count of header rows to be repeated for extended sheets.

setHeaderRowsCount(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

The header rows specified by this property will be duplicated for those extended sheets. This property only takes effect when ExtendToNextSheet is true.

getHeaderColumnsCount()

@deprecated. Please use the ‘headerColumnsCount’ property instead. The count of header columns to be repeated for extended sheets.

getHeaderColumnsCount() : number;

Remarks

The header columns specified by this property will be duplicated for those extended sheets. This property only takes effect when ExtendToNextSheet is true.

setHeaderColumnsCount(number)

@deprecated. Please use the ‘headerColumnsCount’ property instead. The count of header columns to be repeated for extended sheets.

setHeaderColumnsCount(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

The header columns specified by this property will be duplicated for those extended sheets. This property only takes effect when ExtendToNextSheet is true.

getMaxRowCount()

@deprecated. Please use the ‘maxRowCount’ property instead. The maximum count of rows to be imported for one sheet.

getMaxRowCount() : number;

Remarks

Those rows exceeding this limit will be ignored or extended to next sheet according to ExtendToNextSheet. This count includes the header rows(HeaderRowsCount). The maximum allowed value of it is the row limit of corresponding file format, such as for xlsx file it 1048576. If this property has not been specified or the specified value is not positive, then the maximum limit will be used too.

setMaxRowCount(number)

@deprecated. Please use the ‘maxRowCount’ property instead. The maximum count of rows to be imported for one sheet.

setMaxRowCount(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

Those rows exceeding this limit will be ignored or extended to next sheet according to ExtendToNextSheet. This count includes the header rows(HeaderRowsCount). The maximum allowed value of it is the row limit of corresponding file format, such as for xlsx file it 1048576. If this property has not been specified or the specified value is not positive, then the maximum limit will be used too.

getMaxColumnCount()

@deprecated. Please use the ‘maxColumnCount’ property instead. The maximum count of columns to be imported for one sheet.

getMaxColumnCount() : number;

Remarks

Those columns exceeding this limit will be ignored or extended to next sheet according to ExtendToNextSheet. This count includes the header columns(HeaderColumnsCount). The maximum value of it is the column limit of corresponding file format, such as for xlsx file it 16384. If this property has not been specified or the specified value is not positive, then the maximum limit will be used too.

setMaxColumnCount(number)

@deprecated. Please use the ‘maxColumnCount’ property instead. The maximum count of columns to be imported for one sheet.

setMaxColumnCount(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

Those columns exceeding this limit will be ignored or extended to next sheet according to ExtendToNextSheet. This count includes the header columns(HeaderColumnsCount). The maximum value of it is the column limit of corresponding file format, such as for xlsx file it 16384. If this property has not been specified or the specified value is not positive, then the maximum limit will be used too.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;

getLoadFormat()

@deprecated. Please use the ’loadFormat’ property instead. Gets the load format.

getLoadFormat() : LoadFormat;

Returns

LoadFormat

getPassword()

@deprecated. Please use the ‘password’ property instead. Gets and set the password of the workbook.

getPassword() : string;

setPassword(string)

@deprecated. Please use the ‘password’ property instead. Gets and set the password of the workbook.

setPassword(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getParsingFormulaOnOpen()

@deprecated. Please use the ‘parsingFormulaOnOpen’ property instead. 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)

@deprecated. Please use the ‘parsingFormulaOnOpen’ property instead. Indicates whether parsing the formula when reading the file.

setParsingFormulaOnOpen(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe 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()

@deprecated. Please use the ‘parsingPivotCachedRecords’ property instead. 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)

@deprecated. Please use the ‘parsingPivotCachedRecords’ property instead. Indicates whether parsing pivot cached records when loading the file. The default value is false.

setParsingPivotCachedRecords(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Only applies for Excel Xlsx, Xltx, Xltm , Xlsm and xlsb file

getLanguageCode()

@deprecated. Please use the ’languageCode’ property instead. Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.

getLanguageCode() : CountryCode;

Returns

CountryCode

setLanguageCode(CountryCode)

@deprecated. Please use the ’languageCode’ property instead. Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.

setLanguageCode(value: CountryCode) : void;

Parameters:

ParameterTypeDescription
valueCountryCodeThe value to set.

getRegion()

@deprecated. Please use the ‘region’ property instead. Gets or sets the regional settings used for the Workbook that will be loaded.

getRegion() : CountryCode;

Returns

CountryCode

Remarks

The regional settings may be used for initializing some features for the workbook such as fonts, themes, and so on. For text based file formats, such as CSV, HTML, …, the regional setting also will be used to detect number formats and parse text values to numeric or datetime values for cells. This setting will be kept for the instantiated workbook later, that is, WorkbookSettings.Region of the workbook will use the same region with this property.

setRegion(CountryCode)

@deprecated. Please use the ‘region’ property instead. Gets or sets the regional settings used for the Workbook that will be loaded.

setRegion(value: CountryCode) : void;

Parameters:

ParameterTypeDescription
valueCountryCodeThe value to set.

Remarks

The regional settings may be used for initializing some features for the workbook such as fonts, themes, and so on. For text based file formats, such as CSV, HTML, …, the regional setting also will be used to detect number formats and parse text values to numeric or datetime values for cells. This setting will be kept for the instantiated workbook later, that is, WorkbookSettings.Region of the workbook will use the same region with this property.

getDefaultStyleSettings()

@deprecated. Please use the ‘defaultStyleSettings’ property instead. Gets the default style settings for initializing styles of the workbook

getDefaultStyleSettings() : DefaultStyleSettings;

Returns

DefaultStyleSettings

getInterruptMonitor()

@deprecated. Please use the ‘interruptMonitor’ property instead. Gets and sets the interrupt monitor.

getInterruptMonitor() : AbstractInterruptMonitor;

Returns

AbstractInterruptMonitor

setInterruptMonitor(AbstractInterruptMonitor)

@deprecated. Please use the ‘interruptMonitor’ property instead. Gets and sets the interrupt monitor.

setInterruptMonitor(value: AbstractInterruptMonitor) : void;

Parameters:

ParameterTypeDescription
valueAbstractInterruptMonitorThe value to set.

getIgnoreNotPrinted()

@deprecated. Please use the ‘ignoreNotPrinted’ property instead. Ignore the data which are not printed if directly printing the file

getIgnoreNotPrinted() : boolean;

Remarks

Only for xlsx file.

setIgnoreNotPrinted(boolean)

@deprecated. Please use the ‘ignoreNotPrinted’ property instead. Ignore the data which are not printed if directly printing the file

setIgnoreNotPrinted(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Only for xlsx file.

getCheckDataValid()

@deprecated. Please use the ‘checkDataValid’ property instead. Check whether data is valid in the template file.

getCheckDataValid() : boolean;

setCheckDataValid(boolean)

@deprecated. Please use the ‘checkDataValid’ property instead. Check whether data is valid in the template file.

setCheckDataValid(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getCheckExcelRestriction()

@deprecated. Please use the ‘checkExcelRestriction’ property instead. 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)

@deprecated. Please use the ‘checkExcelRestriction’ property instead. 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:

ParameterTypeDescription
valuebooleanThe value to set.

getKeepUnparsedData()

@deprecated. Please use the ‘keepUnparsedData’ property instead. 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)

@deprecated. Please use the ‘keepUnparsedData’ property instead. 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:

ParameterTypeDescription
valuebooleanThe 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()

@deprecated. Please use the ’loadFilter’ property instead. The filter to denote how to load data.

getLoadFilter() : LoadFilter;

Returns

LoadFilter

setLoadFilter(LoadFilter)

@deprecated. Please use the ’loadFilter’ property instead. The filter to denote how to load data.

setLoadFilter(value: LoadFilter) : void;

Parameters:

ParameterTypeDescription
valueLoadFilterThe value to set.

getLightCellsDataHandler()

@deprecated. Please use the ’lightCellsDataHandler’ property instead. The data handler for processing cells data when reading template file.

getLightCellsDataHandler() : LightCellsDataHandler;

Returns

LightCellsDataHandler

setLightCellsDataHandler(LightCellsDataHandler)

@deprecated. Please use the ’lightCellsDataHandler’ property instead. The data handler for processing cells data when reading template file.

setLightCellsDataHandler(value: LightCellsDataHandler) : void;

Parameters:

ParameterTypeDescription
valueLightCellsDataHandlerThe value to set.

getMemorySetting()

@deprecated. Please use the ‘memorySetting’ property instead. Gets or sets the memory mode for loaded workbook.

getMemorySetting() : MemorySetting;

Returns

MemorySetting

Remarks

For more details about memory mode, please see Cells.MemorySetting.

setMemorySetting(MemorySetting)

@deprecated. Please use the ‘memorySetting’ property instead. Gets or sets the memory mode for loaded workbook.

setMemorySetting(value: MemorySetting) : void;

Parameters:

ParameterTypeDescription
valueMemorySettingThe value to set.

Remarks

For more details about memory mode, please see Cells.MemorySetting.

setWarningCallback(IWarningCallback)

@deprecated. Please use the ‘warningCallback’ property instead. Gets or sets warning callback.

setWarningCallback(value: IWarningCallback) : void;

Parameters:

ParameterTypeDescription
valueIWarningCallbackThe value to set.

getWarningCallback()

@deprecated. Please use the ‘warningCallback’ property instead. Gets or sets warning callback.

getWarningCallback() : IWarningCallback;

Returns

IWarningCallback

getAutoFitterOptions()

@deprecated. Please use the ‘autoFitterOptions’ property instead. Gets and sets the auto fitter options

getAutoFitterOptions() : AutoFitterOptions;

Returns

AutoFitterOptions

Remarks

Only for xlsx ,spreadsheetML file now.

setAutoFitterOptions(AutoFitterOptions)

@deprecated. Please use the ‘autoFitterOptions’ property instead. Gets and sets the auto fitter options

setAutoFitterOptions(value: AutoFitterOptions) : void;

Parameters:

ParameterTypeDescription
valueAutoFitterOptionsThe value to set.

Remarks

Only for xlsx ,spreadsheetML file now.

getAutoFilter()

@deprecated. Please use the ‘autoFilter’ property instead. 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)

@deprecated. Please use the ‘autoFilter’ property instead. Indicates whether auto filtering the data when loading the files.

setAutoFilter(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe 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()

@deprecated. Please use the ‘fontConfigs’ property instead. Gets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load.

getFontConfigs() : IndividualFontConfigs;

Returns

IndividualFontConfigs

setFontConfigs(IndividualFontConfigs)

@deprecated. Please use the ‘fontConfigs’ property instead. Gets and sets individual font configs. Only works for the Workbook which uses this LoadOptions to load.

setFontConfigs(value: IndividualFontConfigs) : void;

Parameters:

ParameterTypeDescription
valueIndividualFontConfigsThe value to set.

getIgnoreUselessShapes()

@deprecated. Please use the ‘ignoreUselessShapes’ property instead. 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)

@deprecated. Please use the ‘ignoreUselessShapes’ property instead. Indicates whether ignoring useless shapes.

setIgnoreUselessShapes(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe 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()

@deprecated. Please use the ‘preservePaddingSpacesInFormula’ property instead. 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)

@deprecated. Please use the ‘preservePaddingSpacesInFormula’ property instead. 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:

ParameterTypeDescription
valuebooleanThe 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:

ParameterTypeDescription
typePaperSizeTypeThe default paper size.

Remarks

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

getEncoding()

@deprecated. Please use the ’encoding’ property instead. Gets and sets the default encoding. Only applies for csv file.

getEncoding() : EncodingType;

Returns

EncodingType

setEncoding(EncodingType)

@deprecated. Please use the ’encoding’ property instead. Gets and sets the default encoding. Only applies for csv file.

setEncoding(value: EncodingType) : void;

Parameters:

ParameterTypeDescription
valueEncodingTypeThe value to set.

getLoadStyleStrategy()

@deprecated. Please use the ’loadStyleStrategy’ property instead. Indicates the strategy to apply style for parsed values when converting string value to number or datetime.

getLoadStyleStrategy() : TxtLoadStyleStrategy;

Returns

TxtLoadStyleStrategy

setLoadStyleStrategy(TxtLoadStyleStrategy)

@deprecated. Please use the ’loadStyleStrategy’ property instead. Indicates the strategy to apply style for parsed values when converting string value to number or datetime.

setLoadStyleStrategy(value: TxtLoadStyleStrategy) : void;

Parameters:

ParameterTypeDescription
valueTxtLoadStyleStrategyThe value to set.

getConvertNumericData()

@deprecated. Please use the ‘convertNumericData’ property instead. Gets or sets a value that indicates whether the string in text file is converted to numeric data. Default value is true.

getConvertNumericData() : boolean;

setConvertNumericData(boolean)

@deprecated. Please use the ‘convertNumericData’ property instead. Gets or sets a value that indicates whether the string in text file is converted to numeric data. Default value is true.

setConvertNumericData(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getConvertDateTimeData()

@deprecated. Please use the ‘convertDateTimeData’ property instead. Gets or sets a value that indicates whether the string in text file is converted to date data. Default value is true.

getConvertDateTimeData() : boolean;

setConvertDateTimeData(boolean)

@deprecated. Please use the ‘convertDateTimeData’ property instead. Gets or sets a value that indicates whether the string in text file is converted to date data. Default value is true.

setConvertDateTimeData(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getKeepPrecision()

@deprecated. Please use the ‘keepPrecision’ property instead. Indicates whether not parsing a string value if the length is 15.

getKeepPrecision() : boolean;

setKeepPrecision(boolean)

@deprecated. Please use the ‘keepPrecision’ property instead. Indicates whether not parsing a string value if the length is 15.

setKeepPrecision(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.