com.aspose.cells
Class TxtLoadOptions

java.lang.Object
  extended by LoadOptions
      extended by com.aspose.cells.TxtLoadOptions

public class TxtLoadOptions 
extends LoadOptions

Represents the options for loading text file.

Constructor Summary
TxtLoadOptions()
           Creates the options for loading text file.
TxtLoadOptions(int loadFormat)
           Creates the options for loading text file.
 
Property Getters/Setters Summary
booleangetCheckExcelRestriction()→ inherited from LoadOptions
voidsetCheckExcelRestriction(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.
booleangetConvertDateTimeData()
voidsetConvertDateTimeData(boolean value)
           Gets or sets a value that indicates whether the string in text file is converted to date data.
booleangetConvertNumericData()
voidsetConvertNumericData(boolean value)
           Gets or sets a value that indicates whether the string in text file is converted to numeric data.
EncodinggetEncoding()
voidsetEncoding(Encoding value)
           Gets and sets the default encoding.Only applies for csv file.
booleanhasFormula()
voidsetHasFormula(boolean value)
           Indicates whether the text is formula if it starts with "=".
booleangetIgnoreNotPrinted()→ inherited from LoadOptions
voidsetIgnoreNotPrinted(boolean value)
           Ignore the data which are not printed if directly printing the file
InterruptMonitorgetInterruptMonitor()→ inherited from LoadOptions
voidsetInterruptMonitor(InterruptMonitor value)
           Gets and sets the interrupt monitor.
booleanisMultiEncoded()
voidsetMultiEncoded(boolean value)
           True means that the file contains several encoding.
booleangetKeepExactFormat()
voidsetKeepExactFormat(boolean value)
           Indicates whether the exact formatting should be kept for the cell when converting string value to number or datetime. When ms excel loading datetime or numeric values from csv file, the formatting of those values may be changed, such as leading/tailing zeros of number, year/month/day order of datetime, ...etc. To simulate ms excel's behavior, please set this property to false. Default value of this property is true, so the cell value will be formatted as the same string value in csv template file.
intgetLanguageCode()→ inherited from LoadOptions
voidsetLanguageCode(int value)
           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.
LightCellsDataHandlergetLightCellsDataHandler()→ inherited from LoadOptions
voidsetLightCellsDataHandler(LightCellsDataHandler value)
           The data handler for processing cells data when reading template file.
booleangetLoadDataAndFormatting()→ inherited from LoadOptions
voidsetLoadDataAndFormatting(boolean value)
           If true, only loads data , formulas and formatting from the file, other contents and settings are all discarded. For example : shapes ,validation,conditional formatting,pivotables are not loaded.
intgetLoadDataFilterOptions()→ inherited from LoadOptions
voidsetLoadDataFilterOptions(int value)
           The filter options to denote what data should be loaded. The value of the property is LoadDataFilterOptions integer constant.
booleangetLoadDataOnly()→ inherited from LoadOptions
voidsetLoadDataOnly(boolean value)
           If true, only loads data and formulas from the file, other contents and settings are all discarded.
LoadDataOptiongetLoadDataOptions()→ inherited from LoadOptions
voidsetLoadDataOptions(LoadDataOption value)
           Only effects when OnlyLoadData is true.
LoadFiltergetLoadFilter()→ inherited from LoadOptions
voidsetLoadFilter(LoadFilter value)
           The filter to denote how to load data.
intgetLoadFormat()→ inherited from LoadOptions
           Gets and set the load format. The value of the property is LoadFormat integer constant.
intgetLoadStyleStrategy()
voidsetLoadStyleStrategy(int value)
           Indicates the strategy to apply style for parsed values when converting string value to number or datetime. The value of the property is TxtLoadStyleStrategy integer constant.
java.util.LocalegetLocale()→ inherited from LoadOptions
voidsetLocale(java.util.Locale value)
           Gets and sets the Locale used for workbook at the time the file was loaded.
intgetMemorySetting()→ inherited from LoadOptions
voidsetMemorySetting(int value)
           Gets or sets the memory usage options. The value of the property is MemorySetting integer constant.
booleangetOnlyLoadDocumentProperties()→ inherited from LoadOptions
voidsetOnlyLoadDocumentProperties(boolean value)
           If true, only loads document properties
booleangetParsingFormulaOnOpen()→ inherited from LoadOptions
voidsetParsingFormulaOnOpen(boolean value)
           Indicates whether parsing the formula when reading the file.
java.lang.StringgetPassword()→ inherited from LoadOptions
voidsetPassword(java.lang.String value)
           Gets and set the password of the workbook.
ICustomParser[]getPreferredParsers()
voidsetPreferredParsers(ICustomParser[] value)
           Gets and sets preferred value parsers for loading text file.
intgetRegion()→ inherited from LoadOptions
voidsetRegion(int value)
           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.
chargetSeparator()
voidsetSeparator(char value)
           Gets and sets char Delimiter of text file.
java.lang.StringgetSeparatorString()
voidsetSeparatorString(java.lang.String value)
           Gets and sets the a string value as separator.
java.lang.StringgetStandardFont()→ inherited from LoadOptions
voidsetStandardFont(java.lang.String value)
           Sets the default standard font name
doublegetStandardFontSize()→ inherited from LoadOptions
voidsetStandardFontSize(double value)
           Sets the default standard font size.
IWarningCallbackgetWarningCallback()→ inherited from LoadOptions
voidsetWarningCallback(IWarningCallback value)
           Gets or sets warning callback.
 
Method Summary
voidsetPaperSize(int type)→ inherited from LoadOptions
           Sets the default print paper size from default printer's setting.
 

Constructor Detail

TxtLoadOptions

public TxtLoadOptions()
Creates the options for loading text file. The default load file type is CSV .

TxtLoadOptions

public TxtLoadOptions(int loadFormat)
Creates the options for loading text file.
Parameters:
loadFormat - A LoadFormat value. The loading format

Property Getters/Setters Detail

getConvertNumericData/setConvertNumericData

public boolean getConvertNumericData() / public void setConvertNumericData(boolean value)
Gets or sets a value that indicates whether the string in text file is converted to numeric data.

getSeparator/setSeparator

public char getSeparator() / public void setSeparator(char value)
Gets and sets char Delimiter of text file.

getSeparatorString/setSeparatorString

public java.lang.String getSeparatorString() / public void setSeparatorString(java.lang.String value)
Gets and sets the a string value as separator.

getEncoding/setEncoding

public Encoding getEncoding() / public void setEncoding(Encoding value)
Gets and sets the default encoding.Only applies for csv file.

isMultiEncoded/setMultiEncoded

public boolean isMultiEncoded() / public void setMultiEncoded(boolean value)
True means that the file contains several encoding.

getPreferredParsers/setPreferredParsers

public ICustomParser[] getPreferredParsers() / public void setPreferredParsers(ICustomParser[] value)
Gets and sets preferred value parsers for loading text file. 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.

getConvertDateTimeData/setConvertDateTimeData

public boolean getConvertDateTimeData() / public void setConvertDateTimeData(boolean value)
Gets or sets a value that indicates whether the string in text file is converted to date data.

getLoadStyleStrategy/setLoadStyleStrategy

public int getLoadStyleStrategy() / public void setLoadStyleStrategy(int value)
Indicates the strategy to apply style for parsed values when converting string value to number or datetime. The value of the property is TxtLoadStyleStrategy integer constant.

hasFormula/setHasFormula

public boolean hasFormula() / public void setHasFormula(boolean value)
Indicates whether the text is formula if it starts with "=".

getKeepExactFormat/setKeepExactFormat

public boolean getKeepExactFormat() / public void setKeepExactFormat(boolean value)
Indicates whether the exact formatting should be kept for the cell when converting string value to number or datetime. When ms excel loading datetime or numeric values from csv file, the formatting of those values may be changed, such as leading/tailing zeros of number, year/month/day order of datetime, ...etc. To simulate ms excel's behavior, please set this property to false. Default value of this property is true, so the cell value will be formatted as the same string value in csv template file. NOTE: This member is now obsolete. Instead, please set LoadStyleStrategy property to TxtLoadStyleStrategy.BuiltIn to get same result with this property's false value and TxtLoadStyleStrategy.ExactFormat to get same result with this property's true value. This property will be removed 12 months later since February 2015. Aspose apologizes for any inconvenience you may have experienced.

getLoadFormat

→ inherited from LoadOptions
public int getLoadFormat()
Gets and set the load format. The value of the property is LoadFormat integer constant.

getPassword/setPassword

→ inherited from LoadOptions
public java.lang.String getPassword() / public void setPassword(java.lang.String value)
Gets and set the password of the workbook.

getParsingFormulaOnOpen/setParsingFormulaOnOpen

→ inherited from LoadOptions
public boolean getParsingFormulaOnOpen() / public void setParsingFormulaOnOpen(boolean value)
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.

getLoadDataAndFormatting/setLoadDataAndFormatting

→ inherited from LoadOptions
public boolean getLoadDataAndFormatting() / public void setLoadDataAndFormatting(boolean value)
If true, only loads data , formulas and formatting from the file, other contents and settings are all discarded. For example : shapes ,validation,conditional formatting,pivotables are not loaded. NOTE: This member is now obsolete. Instead, please use LoadFilter property(LoadFilter = new LoadFilter(LoadDataFilterOptions.CellData). This property will be removed 12 months later since November 2016. Aspose apologizes for any inconvenience you may have experienced.

getLoadDataOnly/setLoadDataOnly

→ inherited from LoadOptions
public boolean getLoadDataOnly() / public void setLoadDataOnly(boolean value)
If true, only loads data and formulas from the file, other contents and settings are all discarded. NOTE: This member is now obsolete. Instead, please use LoadFilter property(LoadFilter = new LoadFilter(LoadDataFilterOptions.CellData). This property will be removed 12 months later since June 2016. Aspose apologizes for any inconvenience you may have experienced.

getOnlyLoadDocumentProperties/setOnlyLoadDocumentProperties

→ inherited from LoadOptions
public boolean getOnlyLoadDocumentProperties() / public void setOnlyLoadDocumentProperties(boolean value)
If true, only loads document properties Only for excel 97- 2003 xls file. If the file is encrypted, we still can get the document properties without password NOTE: This member is now obsolete. Instead, please use LoadFilter property(LoadFilter = new LoadFilter(LoadDataFilterOptions.DocumentProperties). This property will be removed 12 months later since November 2016. Aspose apologizes for any inconvenience you may have experienced.

getLoadDataOptions/setLoadDataOptions

→ inherited from LoadOptions
public LoadDataOption getLoadDataOptions() / public void setLoadDataOptions(LoadDataOption value)
Only effects when OnlyLoadData is true. NOTE: This member is now obsolete. Instead, please use LoadFilter property(User may extend LoadFilter to filter the worksheet and data). This property will be removed 12 months later since November 2016. Aspose apologizes for any inconvenience you may have experienced.

getLanguageCode/setLanguageCode

→ inherited from LoadOptions
public int getLanguageCode() / public void setLanguageCode(int value)
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.

getRegion/setRegion

→ inherited from LoadOptions
public int getRegion() / public void setRegion(int value)
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.

getLocale/setLocale

→ inherited from LoadOptions
public java.util.Locale getLocale() / public void setLocale(java.util.Locale value)
Gets and sets the Locale used for workbook at the time the file was loaded.

getStandardFont/setStandardFont

→ inherited from LoadOptions
public java.lang.String getStandardFont() / public void setStandardFont(java.lang.String value)
Sets the default standard font name

getStandardFontSize/setStandardFontSize

→ inherited from LoadOptions
public double getStandardFontSize() / public void setStandardFontSize(double value)
Sets the default standard font size.

getInterruptMonitor/setInterruptMonitor

→ inherited from LoadOptions
public InterruptMonitor getInterruptMonitor() / public void setInterruptMonitor(InterruptMonitor value)
Gets and sets the interrupt monitor.

getIgnoreNotPrinted/setIgnoreNotPrinted

→ inherited from LoadOptions
public boolean getIgnoreNotPrinted() / public void setIgnoreNotPrinted(boolean value)
Ignore the data which are not printed if directly printing the file Only for xlsx file.

getCheckExcelRestriction/setCheckExcelRestriction

→ inherited from LoadOptions
public boolean getCheckExcelRestriction() / 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.

getLoadFilter/setLoadFilter

→ inherited from LoadOptions
public LoadFilter getLoadFilter() / public void setLoadFilter(LoadFilter value)
The filter to denote how to load data.

getLoadDataFilterOptions/setLoadDataFilterOptions

→ inherited from LoadOptions
public int getLoadDataFilterOptions() / public void setLoadDataFilterOptions(int value)
The filter options to denote what data should be loaded. The value of the property is LoadDataFilterOptions integer constant. NOTE: This member is now obsolete. Instead, please use LoadFilter property(LoadFilter = new LoadFilter(LoadDataFilterOptions). This property will be removed 12 months later since November 2016. Aspose apologizes for any inconvenience you may have experienced.

getLightCellsDataHandler/setLightCellsDataHandler

→ inherited from LoadOptions
public LightCellsDataHandler getLightCellsDataHandler() / public void setLightCellsDataHandler(LightCellsDataHandler value)
The data handler for processing cells data when reading template file.

getMemorySetting/setMemorySetting

→ inherited from LoadOptions
public int getMemorySetting() / public void setMemorySetting(int value)
Gets or sets the memory usage options. The value of the property is MemorySetting integer constant.

getWarningCallback/setWarningCallback

→ inherited from LoadOptions
public IWarningCallback getWarningCallback() / public void setWarningCallback(IWarningCallback value)
Gets or sets warning callback.

Method Detail

setPaperSize

→ inherited from LoadOptions
public void setPaperSize(int 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.
Parameters:
type - A PaperSizeType value. The default paper size.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.