GridTxtLoadOptions
Inheritance: java.lang.Object, com.aspose.gridweb.GridLoadOptions
public class GridTxtLoadOptions extends GridLoadOptions
Represents the options for loading text file.
Constructors
Constructor | Description |
---|---|
GridTxtLoadOptions() | Creates the options for loading text file. |
Methods
Method | Description |
---|---|
equals(Object arg0) | |
getAutoFilter() | Indicates whether auto filtering the data when loading the files. |
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. |
getEncoding() | Gets the default encoding. |
getExtendToNextSheet() | Whether extends data to next sheet when the rows or columns of data exceed limit. |
getIgnoreNotPrinted() | Ignore the data which are not printed if directly printing the file |
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. |
getOnlyAuto() | Indicates whether only fit the rows which height are not customed. |
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. |
getPreservePaddingSpacesInFormula() | Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. |
getSeparator() | Gets character separator of text file. |
getSeparatorString() | Gets a string value as separator. |
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. |
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. |
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. |
setHasFormula(boolean value) | Indicates whether the text is formula if it starts with “=”. |
setHasTextQualifier(boolean value) | Whether there is text qualifier for cell value. |
setIgnoreNotPrinted(boolean value) | Ignore the data which are not printed if directly printing the file |
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. |
setMultiEncoded(boolean value) | True means that the file contains several encoding. |
setOnlyAuto(boolean value) | Indicates whether only fit the rows which height are not customed. |
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. |
setPreservePaddingSpacesInFormula(boolean value) | Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. |
setSeparator(char value) | Sets character separator of text file. |
setSeparatorString(String value) | Sets a string value as separator. |
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. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
GridTxtLoadOptions()
public GridTxtLoadOptions()
Creates the options for loading text file.
Remarks
The default load file type is CSV .
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.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
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
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. If this property is true, extra data will be extended to 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 exceeds limit will be ignored. Default is false;
Returns: boolean
getIgnoreNotPrinted()
public boolean getIgnoreNotPrinted()
Ignore the data which are not printed if directly printing the file
Remarks
Only for xlsx file.
Returns: boolean
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
getOnlyAuto()
public boolean getOnlyAuto()
Indicates whether only fit the rows which height are not customed.
Returns: boolean
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
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, GridWorkbookSettings.getPreservePaddingSpaces() will be set to the same value with this property.
Returns: boolean
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
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 GridTableItemStyle.getQuotePrefix() will be set as true for the cell.
Returns: boolean
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setCheckDataValid(boolean value)
public void setCheckDataValid(boolean value)
Check whether data is valid in the template file.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setEncoding(Encoding value)
public void setEncoding(Encoding value)
Sets the default encoding. Only applies for csv file.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Encoding |
setExtendToNextSheet(boolean value)
public void setExtendToNextSheet(boolean value)
Whether extends data to next sheet when the rows or columns of data exceed limit. If this property is true, extra data will be extended to 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 exceeds limit will be ignored. Default is false;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setHasFormula(boolean value)
public void setHasFormula(boolean value)
Indicates whether the text is formula if it starts with “=”.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setHasTextQualifier(boolean value)
public void setHasTextQualifier(boolean value)
Whether there is text qualifier for cell value. Default is true.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setKeepPrecision(boolean value)
public void setKeepPrecision(boolean value)
Indicates whether not parsing a string value if the length is 15.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setMultiEncoded(boolean value)
public void setMultiEncoded(boolean value)
True means that the file contains several encoding.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setOnlyAuto(boolean value)
public void setOnlyAuto(boolean value)
Indicates whether only fit the rows which height are not customed.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
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:
Parameter | Type | Description |
---|---|---|
value | boolean |
setPassword(String value)
public void setPassword(String value)
Sets the password of the workbook.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
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, GridWorkbookSettings.getPreservePaddingSpaces() will be set to the same value with this property.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setSeparator(char value)
public void setSeparator(char value)
Sets character separator of text file.
Parameters:
Parameter | Type | Description |
---|---|---|
value | char |
setSeparatorString(String value)
public void setSeparatorString(String value)
Sets a string value as separator.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
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:
Parameter | Type | Description |
---|---|---|
value | char |
setTreatConsecutiveDelimitersAsOne(boolean value)
public void setTreatConsecutiveDelimitersAsOne(boolean value)
Whether consecutive delimiters should be treated as one.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
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 GridTableItemStyle.getQuotePrefix() will be set as true for the cell.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |