TxtLoadOptions

Inheritance: java.lang.Object, com.aspose.cells.LoadOptions, com.aspose.cells.AbstractTextLoadOptions

public class TxtLoadOptions extends AbstractTextLoadOptions

Represents the options for loading text file.

Constructors

ConstructorDescription
TxtLoadOptions()Creates the options for loading text file.
TxtLoadOptions(int loadFormat)Creates the options for loading text file.

Methods

MethodDescription
equals(Object arg0)
getAutoFilter()Indicates whether auto filtering the data when loading the files.
getAutoFitterOptions()Gets the auto fitter options
getCheckDataValid()Check whether data is valid in the template file.
getCheckExcelRestriction()Whether check restriction of excel file when user modify cells related objects.
getClass()
getConvertDateTimeData()Gets a value that indicates whether the string in text file is converted to date data.
getConvertNumericData()Gets a value that indicates whether the string in text file is converted to numeric data.
getDefaultStyleSettings()Gets the default style settings for initializing styles of the workbook
getEncoding()Gets the default encoding.
getExtendToNextSheet()Whether extends data to next sheet when the rows or columns of data exceed limit.
getFontConfigs()Gets individual font configs.
getHeaderColumnsCount()The count of header columns to be repeated for extended sheets.
getHeaderRowsCount()The count of header rows to be repeated for extended sheets.
getIgnoreNotPrinted()Ignore the data which are not printed if directly printing the file
getIgnoreUselessShapes()Indicates whether ignoring useless shapes.
getInterruptMonitor()Gets the interrupt monitor.
getKeepPrecision()Indicates whether not parsing a string value if the length is 15.
getKeepUnparsedData()Whether keep the unparsed data in memory for the Workbook when it is loaded from template file.
getLanguageCode()Gets the user interface language of the Workbook version based on CountryCode that has saved the file.
getLightCellsDataHandler()The data handler for processing cells data when reading template file.
getLoadFilter()The filter to denote how to load data.
getLoadFormat()Gets the load format.
getLoadStyleStrategy()Indicates the strategy to apply style for parsed values when converting string value to number or datetime.
getLocale()Gets the Locale used for workbook at the time the file was loaded.
getMaxColumnCount()The maximum count of columns to be imported for one sheet.
getMaxRowCount()The maximum count of rows to be imported for one sheet.
getMemorySetting()Gets the memory usage options.
getParsingFormulaOnOpen()Indicates whether parsing the formula when reading the file.
getParsingPivotCachedRecords()Indicates whether parsing pivot cached records when loading the file.
getPassword()Gets the password of the workbook.
getPreferredParsers()Gets preferred value parsers for loading text file.
getPreservePaddingSpacesInFormula()Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas.
getRegion()Gets the system regional settings based on CountryCode at the time the file was loaded.
getSeparator()Gets character separator of text file.
getSeparatorString()Gets a string value as separator.
getStandardFont()Sets the default standard font name
getStandardFontSize()Sets the default standard font size.
getTextQualifier()Specifies the text qualifier for cell values.
getTreatConsecutiveDelimitersAsOne()Whether consecutive delimiters should be treated as one.
getTreatQuotePrefixAsValue()Indicates whether the leading single quote sign should be taken as part of the value of one cell.
getWarningCallback()Gets warning callback.
hasFormula()Indicates whether the text is formula if it starts with “=”.
hasTextQualifier()Whether there is text qualifier for cell value.
hashCode()
isMultiEncoded()True means that the file contains several encoding.
notify()
notifyAll()
setAutoFilter(boolean value)Indicates whether auto filtering the data when loading the files.
setAutoFitterOptions(AutoFitterOptions value)Sets the auto fitter options
setCheckDataValid(boolean value)Check whether data is valid in the template file.
setCheckExcelRestriction(boolean value)Whether check restriction of excel file when user modify cells related objects.
setConvertDateTimeData(boolean value)Sets a value that indicates whether the string in text file is converted to date data.
setConvertNumericData(boolean value)Sets a value that indicates whether the string in text file is converted to numeric data.
setEncoding(Encoding value)Sets the default encoding.
setExtendToNextSheet(boolean value)Whether extends data to next sheet when the rows or columns of data exceed limit.
setFontConfigs(IndividualFontConfigs value)Sets individual font configs.
setHasFormula(boolean value)Indicates whether the text is formula if it starts with “=”.
setHasTextQualifier(boolean value)Whether there is text qualifier for cell value.
setHeaderColumnsCount(int value)The count of header columns to be repeated for extended sheets.
setHeaderRowsCount(int value)The count of header rows to be repeated for extended sheets.
setIgnoreNotPrinted(boolean value)Ignore the data which are not printed if directly printing the file
setIgnoreUselessShapes(boolean value)Indicates whether ignoring useless shapes.
setInterruptMonitor(AbstractInterruptMonitor value)Sets the interrupt monitor.
setKeepPrecision(boolean value)Indicates whether not parsing a string value if the length is 15.
setKeepUnparsedData(boolean value)Whether keep the unparsed data in memory for the Workbook when it is loaded from template file.
setLanguageCode(int value)Sets the user interface language of the Workbook version based on CountryCode that has saved the file.
setLightCellsDataHandler(LightCellsDataHandler value)The data handler for processing cells data when reading template file.
setLoadFilter(LoadFilter value)The filter to denote how to load data.
setLoadStyleStrategy(int value)Indicates the strategy to apply style for parsed values when converting string value to number or datetime.
setLocale(Locale value)Sets the Locale used for workbook at the time the file was loaded.
setMaxColumnCount(int value)The maximum count of columns to be imported for one sheet.
setMaxRowCount(int value)The maximum count of rows to be imported for one sheet.
setMemorySetting(int value)Sets the memory usage options.
setMultiEncoded(boolean value)True means that the file contains several encoding.
setPaperSize(int type)Sets the default print paper size from default printer’s setting.
setParsingFormulaOnOpen(boolean value)Indicates whether parsing the formula when reading the file.
setParsingPivotCachedRecords(boolean value)Indicates whether parsing pivot cached records when loading the file.
setPassword(String value)Sets the password of the workbook.
setPreferredParsers(ICustomParser[] value)Sets preferred value parsers for loading text file.
setPreservePaddingSpacesInFormula(boolean value)Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas.
setRegion(int value)Sets the system regional settings based on CountryCode at the time the file was loaded.
setSeparator(char value)Sets character separator of text file.
setSeparatorString(String value)Sets a string value as separator.
setStandardFont(String value)Sets the default standard font name
setStandardFontSize(double value)Sets the default standard font size.
setTextQualifier(char value)Specifies the text qualifier for cell values.
setTreatConsecutiveDelimitersAsOne(boolean value)Whether consecutive delimiters should be treated as one.
setTreatQuotePrefixAsValue(boolean value)Indicates whether the leading single quote sign should be taken as part of the value of one cell.
setWarningCallback(IWarningCallback value)Sets warning callback.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

TxtLoadOptions()

public TxtLoadOptions()

Creates the options for loading text file.

Remarks

The default load file type is CSV .

TxtLoadOptions(int loadFormat)

public TxtLoadOptions(int loadFormat)

Creates the options for loading text file.

Parameters:

ParameterTypeDescription
loadFormatintLoadFormat. The loading format

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAutoFilter()

public boolean getAutoFilter()

Indicates whether auto filtering the data when loading the files.

Remarks

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

Returns: boolean

getAutoFitterOptions()

public AutoFitterOptions getAutoFitterOptions()

Gets the auto fitter options

Remarks

Only for xlsx ,spreadsheetML file now.

Returns: AutoFitterOptions

getCheckDataValid()

public boolean getCheckDataValid()

Check whether data is valid in the template file.

Returns: boolean

getCheckExcelRestriction()

public boolean 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.

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getConvertDateTimeData()

public boolean getConvertDateTimeData()

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

Returns: boolean

getConvertNumericData()

public boolean getConvertNumericData()

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

Returns: boolean

getDefaultStyleSettings()

public DefaultStyleSettings getDefaultStyleSettings()

Gets the default style settings for initializing styles of the workbook

Returns: DefaultStyleSettings

getEncoding()

public Encoding getEncoding()

Gets the default encoding. Only applies for csv file.

Returns: Encoding

getExtendToNextSheet()

public boolean getExtendToNextSheet()

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

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.

Returns: boolean

getFontConfigs()

public IndividualFontConfigs getFontConfigs()

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

Returns: IndividualFontConfigs

getHeaderColumnsCount()

public int getHeaderColumnsCount()

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

Remarks

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

Returns: int

getHeaderRowsCount()

public int getHeaderRowsCount()

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

Remarks

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

Returns: int

getIgnoreNotPrinted()

public boolean getIgnoreNotPrinted()

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

Remarks

Only for xlsx file.

Returns: boolean

getIgnoreUselessShapes()

public boolean getIgnoreUselessShapes()

Indicates whether ignoring useless shapes.

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.

Returns: boolean

getInterruptMonitor()

public AbstractInterruptMonitor getInterruptMonitor()

Gets the interrupt monitor.

Returns: AbstractInterruptMonitor

getKeepPrecision()

public boolean getKeepPrecision()

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

Returns: boolean

getKeepUnparsedData()

public boolean getKeepUnparsedData()

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

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,

Returns: boolean

getLanguageCode()

public int getLanguageCode()

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

See CountryCode.

Returns: int

getLightCellsDataHandler()

public LightCellsDataHandler getLightCellsDataHandler()

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

Returns: LightCellsDataHandler

getLoadFilter()

public LoadFilter getLoadFilter()

The filter to denote how to load data.

Returns: LoadFilter

getLoadFormat()

public int getLoadFormat()

Gets the load format.

See LoadFormat.

Returns: int

getLoadStyleStrategy()

public int getLoadStyleStrategy()

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

See TxtLoadStyleStrategy.

Returns: int

getLocale()

public Locale getLocale()

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

Remarks

Returns: java.util.Locale

getMaxColumnCount()

public int getMaxColumnCount()

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

Remarks

Those columns exceeding this limit will be ignored or extended to next sheet according to getExtendToNextSheet(). This count includes the header columns(getHeaderColumnsCount()). 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.

Returns: int

getMaxRowCount()

public int getMaxRowCount()

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

Remarks

Those rows exceeding this limit will be ignored or extended to next sheet according to getExtendToNextSheet(). This count includes the header rows(getHeaderRowsCount()). 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.

Returns: int

getMemorySetting()

public int getMemorySetting()

Gets the memory usage options.

See MemorySetting.

Returns: int

getParsingFormulaOnOpen()

public boolean getParsingFormulaOnOpen()

Indicates whether parsing the formula when reading the file.

Remarks

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

Returns: boolean

getParsingPivotCachedRecords()

public boolean getParsingPivotCachedRecords()

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

Remarks

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

Returns: boolean

getPassword()

public String getPassword()

Gets the password of the workbook.

Returns: java.lang.String

getPreferredParsers()

public ICustomParser[] getPreferredParsers()

Gets preferred value parsers for loading text file.

Remarks

parsers[0] is the parser will be used for the first column in text template file, parsers[1] is the parser will be used for the second column, …etc. The last one(parsers[parsers.length-1]) will be used for all other columns start from parsers.length-1. If one item is null, the corresponding column will be parsed by the default parser of Aspose.Cells.

Returns: com.aspose.cells.ICustomParser[]

getPreservePaddingSpacesInFormula()

public boolean getPreservePaddingSpacesInFormula()

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

Remarks

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

Returns: boolean

getRegion()

public int getRegion()

Gets the system regional settings based on CountryCode at the time the file was loaded.

See CountryCode.

Remarks

If you do not want to use the region saved in the file, please reset it after reading the file.

Returns: int

getSeparator()

public char getSeparator()

Gets character separator of text file.

Returns: char

getSeparatorString()

public String getSeparatorString()

Gets a string value as separator.

Returns: java.lang.String

getStandardFont()

public String getStandardFont()

Sets the default standard font name

Remarks

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.

Returns: java.lang.String

getStandardFontSize()

public double getStandardFontSize()

Sets the default standard font size.

Remarks

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.

Returns: double

getTextQualifier()

public char getTextQualifier()

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

Remarks

When setting this property, hasTextQualifier() will become true automatically.

Returns: char

getTreatConsecutiveDelimitersAsOne()

public boolean getTreatConsecutiveDelimitersAsOne()

Whether consecutive delimiters should be treated as one.

Returns: boolean

getTreatQuotePrefixAsValue()

public boolean getTreatQuotePrefixAsValue()

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.getQuotePrefix() will be set as true for the cell.

Returns: boolean

getWarningCallback()

public IWarningCallback getWarningCallback()

Gets warning callback.

Returns: IWarningCallback

hasFormula()

public boolean hasFormula()

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

Returns: boolean

hasTextQualifier()

public boolean hasTextQualifier()

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

Returns: boolean

hashCode()

public native int hashCode()

Returns: int

isMultiEncoded()

public boolean isMultiEncoded()

True means that the file contains several encoding.

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAutoFilter(boolean value)

public void setAutoFilter(boolean value)

Indicates whether auto filtering the data when loading the files.

Remarks

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

Parameters:

ParameterTypeDescription
valueboolean

setAutoFitterOptions(AutoFitterOptions value)

public void setAutoFitterOptions(AutoFitterOptions value)

Sets the auto fitter options

Remarks

Only for xlsx ,spreadsheetML file now.

Parameters:

ParameterTypeDescription
valueAutoFitterOptions

setCheckDataValid(boolean value)

public void setCheckDataValid(boolean value)

Check whether data is valid in the template file.

Parameters:

ParameterTypeDescription
valueboolean

setCheckExcelRestriction(boolean value)

public void setCheckExcelRestriction(boolean value)

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.

Parameters:

ParameterTypeDescription
valueboolean

setConvertDateTimeData(boolean value)

public void setConvertDateTimeData(boolean value)

Sets a value that indicates whether the string in text file is converted to date data.

Parameters:

ParameterTypeDescription
valueboolean

setConvertNumericData(boolean value)

public void setConvertNumericData(boolean value)

Sets a value that indicates whether the string in text file is converted to numeric data.

Parameters:

ParameterTypeDescription
valueboolean

setEncoding(Encoding value)

public void setEncoding(Encoding value)

Sets the default encoding. Only applies for csv file.

Parameters:

ParameterTypeDescription
valueEncoding

setExtendToNextSheet(boolean value)

public void setExtendToNextSheet(boolean value)

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

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.

Parameters:

ParameterTypeDescription
valueboolean

setFontConfigs(IndividualFontConfigs value)

public void setFontConfigs(IndividualFontConfigs value)

Sets individual font configs. Only works for the Workbook which uses this LoadOptions to load.

Parameters:

ParameterTypeDescription
valueIndividualFontConfigs

setHasFormula(boolean value)

public void setHasFormula(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setHasTextQualifier(boolean value)

public void setHasTextQualifier(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setHeaderColumnsCount(int value)

public void setHeaderColumnsCount(int value)

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

Remarks

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

Parameters:

ParameterTypeDescription
valueint

setHeaderRowsCount(int value)

public void setHeaderRowsCount(int value)

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

Remarks

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

Parameters:

ParameterTypeDescription
valueint

setIgnoreNotPrinted(boolean value)

public void setIgnoreNotPrinted(boolean value)

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

Remarks

Only for xlsx file.

Parameters:

ParameterTypeDescription
valueboolean

setIgnoreUselessShapes(boolean value)

public void setIgnoreUselessShapes(boolean value)

Indicates whether ignoring useless shapes.

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.

Parameters:

ParameterTypeDescription
valueboolean

setInterruptMonitor(AbstractInterruptMonitor value)

public void setInterruptMonitor(AbstractInterruptMonitor value)

Sets the interrupt monitor.

Parameters:

ParameterTypeDescription
valueAbstractInterruptMonitor

setKeepPrecision(boolean value)

public void setKeepPrecision(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setKeepUnparsedData(boolean value)

public void setKeepUnparsedData(boolean value)

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

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,

Parameters:

ParameterTypeDescription
valueboolean

setLanguageCode(int value)

public void setLanguageCode(int value)

Sets the user interface language of the Workbook version based on CountryCode that has saved the file.

See CountryCode.

Parameters:

ParameterTypeDescription
valueint

setLightCellsDataHandler(LightCellsDataHandler value)

public void setLightCellsDataHandler(LightCellsDataHandler value)

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

Parameters:

ParameterTypeDescription
valueLightCellsDataHandler

setLoadFilter(LoadFilter value)

public void setLoadFilter(LoadFilter value)

The filter to denote how to load data.

Parameters:

ParameterTypeDescription
valueLoadFilter

setLoadStyleStrategy(int value)

public void setLoadStyleStrategy(int value)

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

See TxtLoadStyleStrategy.

Parameters:

ParameterTypeDescription
valueint

setLocale(Locale value)

public void setLocale(Locale value)

Sets the Locale used for workbook at the time the file was loaded.

Remarks

Parameters:

ParameterTypeDescription
valuejava.util.Locale

setMaxColumnCount(int value)

public void setMaxColumnCount(int value)

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

Remarks

Those columns exceeding this limit will be ignored or extended to next sheet according to getExtendToNextSheet(). This count includes the header columns(getHeaderColumnsCount()). 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.

Parameters:

ParameterTypeDescription
valueint

setMaxRowCount(int value)

public void setMaxRowCount(int value)

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

Remarks

Those rows exceeding this limit will be ignored or extended to next sheet according to getExtendToNextSheet(). This count includes the header rows(getHeaderRowsCount()). 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.

Parameters:

ParameterTypeDescription
valueint

setMemorySetting(int value)

public void setMemorySetting(int value)

Sets the memory usage options.

See MemorySetting.

Parameters:

ParameterTypeDescription
valueint

setMultiEncoded(boolean value)

public void setMultiEncoded(boolean value)

True means that the file contains several encoding.

Parameters:

ParameterTypeDescription
valueboolean

setPaperSize(int type)

public void setPaperSize(int type)

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

Remarks

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

Parameters:

ParameterTypeDescription
typeintPaperSizeType. The default paper size.

setParsingFormulaOnOpen(boolean value)

public void setParsingFormulaOnOpen(boolean value)

Indicates whether parsing the formula when reading the file.

Remarks

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

Parameters:

ParameterTypeDescription
valueboolean

setParsingPivotCachedRecords(boolean value)

public void setParsingPivotCachedRecords(boolean value)

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

Remarks

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

Parameters:

ParameterTypeDescription
valueboolean

setPassword(String value)

public void setPassword(String value)

Sets the password of the workbook.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setPreferredParsers(ICustomParser[] value)

public void setPreferredParsers(ICustomParser[] value)

Sets preferred value parsers for loading text file.

Remarks

parsers[0] is the parser will be used for the first column in text template file, parsers[1] is the parser will be used for the second column, …etc. The last one(parsers[parsers.length-1]) will be used for all other columns start from parsers.length-1. If one item is null, the corresponding column will be parsed by the default parser of Aspose.Cells.

Parameters:

ParameterTypeDescription
valueICustomParser[]

setPreservePaddingSpacesInFormula(boolean value)

public void setPreservePaddingSpacesInFormula(boolean value)

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

Remarks

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

Parameters:

ParameterTypeDescription
valueboolean

setRegion(int value)

public void setRegion(int value)

Sets the system regional settings based on CountryCode at the time the file was loaded.

See CountryCode.

Remarks

If you do not want to use the region saved in the file, please reset it after reading the file.

Parameters:

ParameterTypeDescription
valueint

setSeparator(char value)

public void setSeparator(char value)

Sets character separator of text file.

Parameters:

ParameterTypeDescription
valuechar

setSeparatorString(String value)

public void setSeparatorString(String value)

Sets a string value as separator.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setStandardFont(String value)

public void setStandardFont(String value)

Sets the default standard font name

Remarks

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.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setStandardFontSize(double value)

public void setStandardFontSize(double value)

Sets the default standard font size.

Remarks

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.

Parameters:

ParameterTypeDescription
valuedouble

setTextQualifier(char value)

public void setTextQualifier(char value)

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

Remarks

When setting this property, hasTextQualifier() will become true automatically.

Parameters:

ParameterTypeDescription
valuechar

setTreatConsecutiveDelimitersAsOne(boolean value)

public void setTreatConsecutiveDelimitersAsOne(boolean value)

Whether consecutive delimiters should be treated as one.

Parameters:

ParameterTypeDescription
valueboolean

setTreatQuotePrefixAsValue(boolean value)

public void setTreatQuotePrefixAsValue(boolean value)

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.getQuotePrefix() will be set as true for the cell.

Parameters:

ParameterTypeDescription
valueboolean

setWarningCallback(IWarningCallback value)

public void setWarningCallback(IWarningCallback value)

Sets warning callback.

Parameters:

ParameterTypeDescription
valueIWarningCallback

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int