Class TxtLoadOptions
Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)
Represents the options for loading text file.
public class TxtLoadOptions : AbstractTextLoadOptions
Inheritance
object ← LoadOptions ← AbstractTextLoadOptions ← TxtLoadOptions
Inherited Members
AbstractTextLoadOptions.Copy(AbstractTextLoadOptions), AbstractTextLoadOptions.Encoding, AbstractTextLoadOptions.LoadStyleStrategy, AbstractTextLoadOptions.ConvertNumericData, AbstractTextLoadOptions.ConvertDateTimeData, AbstractTextLoadOptions.KeepPrecision, LoadOptions.m_LoadFormat, LoadOptions.SetPaperSize(PaperSizeType), LoadOptions.LoadFormat, LoadOptions.Password, LoadOptions.ParsingFormulaOnOpen, LoadOptions.ParsingPivotCachedRecords, LoadOptions.LanguageCode, LoadOptions.Region, LoadOptions.CultureInfo, LoadOptions.DefaultStyleSettings, LoadOptions.InterruptMonitor, LoadOptions.IgnoreNotPrinted, LoadOptions.CheckDataValid, LoadOptions.CheckExcelRestriction, LoadOptions.KeepUnparsedData, LoadOptions.LoadFilter, LoadOptions.LightCellsDataHandler, LoadOptions.MemorySetting, LoadOptions.WarningCallback, LoadOptions.AutoFitterOptions, LoadOptions.AutoFilter, LoadOptions.FontConfigs, LoadOptions.IgnoreUselessShapes, LoadOptions.PreservePaddingSpacesInFormula, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
TxtLoadOptions()
Creates the options for loading text file.
public TxtLoadOptions()
Remarks
The default load file type is CSV .
TxtLoadOptions(LoadFormat)
Creates the options for loading text file.
public TxtLoadOptions(LoadFormat loadFormat)
Parameters
loadFormat
LoadFormat
The loading format
Properties
ExtendToNextSheet
Whether extends data to next sheet when the rows or columns of data exceed limit. Default is false.
public bool ExtendToNextSheet { get; set; }
Property Value
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.
HasFormula
Indicates whether the text is formula if it starts with “=”.
public bool HasFormula { get; set; }
Property Value
HasTextQualifier
Whether there is text qualifier for cell value. Default is true.
public bool HasTextQualifier { get; set; }
Property Value
HeaderColumnsCount
The count of header columns to be repeated for extended sheets.
public int HeaderColumnsCount { get; set; }
Property Value
Remarks
The header columns specified by this property will be duplicated for those extended sheets. This property only takes effect when Aspose.Cells.TxtLoadOptions.ExtendToNextSheet is true.
HeaderRowsCount
The count of header rows to be repeated for extended sheets.
public int HeaderRowsCount { get; set; }
Property Value
Remarks
The header rows specified by this property will be duplicated for those extended sheets. This property only takes effect when Aspose.Cells.TxtLoadOptions.ExtendToNextSheet is true.
IsMultiEncoded
True means that the file contains several encoding.
public bool IsMultiEncoded { get; set; }
Property Value
MaxColumnCount
The maximum count of columns to be imported for one sheet.
public int MaxColumnCount { get; set; }
Property Value
Remarks
Those columns exceeding this limit will be ignored or extended to next sheet according to Aspose.Cells.TxtLoadOptions.ExtendToNextSheet. This count includes the header columns(Aspose.Cells.TxtLoadOptions.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.
MaxRowCount
The maximum count of rows to be imported for one sheet.
public int MaxRowCount { get; set; }
Property Value
Remarks
Those rows exceeding this limit will be ignored or extended to next sheet according to Aspose.Cells.TxtLoadOptions.ExtendToNextSheet. This count includes the header rows(Aspose.Cells.TxtLoadOptions.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.
PreferredParsers
Gets and sets preferred value parsers for loading text file.
public ICustomParser[] PreferredParsers { get; set; }
Property Value
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.
Separator
Gets and sets character separator of text file.
public char Separator { get; set; }
Property Value
SeparatorString
Gets and sets a string value as separator.
public string SeparatorString { get; set; }
Property Value
TextQualifier
Specifies the text qualifier for cell values. Default qualifier is ‘"’.
public char TextQualifier { get; set; }
Property Value
Remarks
When setting this property, Aspose.Cells.TxtLoadOptions.HasTextQualifier will become true automatically.
TreatConsecutiveDelimitersAsOne
Whether consecutive delimiters should be treated as one.
public bool TreatConsecutiveDelimitersAsOne { get; set; }
Property Value
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 Aspose.Cells.Style.QuotePrefix will be set as true for the cell.
public bool TreatQuotePrefixAsValue { get; set; }