Class TxtSaveOptions

Class TxtSaveOptions

Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)

Represents the save options for csv/tab delimited/other text format.

public class TxtSaveOptions : SaveOptions

Inheritance

objectSaveOptionsTxtSaveOptions

Inherited Members

SaveOptions.m_SaveFormat, SaveOptions.SaveFormat, SaveOptions.ClearData, SaveOptions.CachedFileFolder, SaveOptions.ValidateMergedAreas, SaveOptions.MergeAreas, SaveOptions.CreateDirectory, SaveOptions.SortNames, SaveOptions.SortExternalNames, SaveOptions.RefreshChartCache, SaveOptions.WarningCallback, SaveOptions.CheckExcelRestriction, SaveOptions.UpdateSmartArt, SaveOptions.EncryptDocumentProperties, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

TxtSaveOptions()

Creates text file save options.

public TxtSaveOptions()

TxtSaveOptions(SaveFormat)

Creates text file save options.

public TxtSaveOptions(SaveFormat saveFormat)

Parameters

saveFormat SaveFormat

The file format. It should be Aspose.Cells.SaveFormat.Csv or Aspose.Cells.SaveFormat.Tsv, otherwise the saved format will be set as Aspose.Cells.SaveFormat.Csv automatically.

Properties

Encoding

Gets and sets the default encoding.

public Encoding Encoding { get; set; }

Property Value

Encoding

ExportAllSheets

Indicates whether exporting all sheets to the text file. If it is false, only export the activesheet, just like MS Excel.

public bool ExportAllSheets { get; set; }

Property Value

bool

Remarks

The defult value is false.

ExportArea

The range of cells to be exported.

public CellArea ExportArea { get; set; }

Property Value

CellArea

Remarks

If the exported area has been specified, Aspose.Cells.TxtSaveOptions.TrimLeadingBlankRowAndColumn will takes no effect.

ExportQuotePrefix

Indicates whether the single quote sign should be exported as part of the value of one cell when Aspose.Cells.Style.QuotePrefix is true for it. Default is false.

public bool ExportQuotePrefix { get; set; }

Property Value

bool

FormatStrategy

Gets and sets the format strategy when exporting the cell value as string.

public CellValueFormatStrategy FormatStrategy { get; set; }

Property Value

CellValueFormatStrategy

KeepSeparatorsForBlankRow

Indicates whether separators should be output for blank row. Default value is false so by default the content for blank row will be empty.

public bool KeepSeparatorsForBlankRow { get; set; }

Property Value

bool

LightCellsDataProvider

The data provider for saving workbook in light mode.

public LightCellsDataProvider LightCellsDataProvider { get; set; }

Property Value

LightCellsDataProvider

QuoteType

Gets or sets how to quote values in the exported text file.

public TxtValueQuoteType QuoteType { get; set; }

Property Value

TxtValueQuoteType

Separator

Gets and sets char Delimiter of text file.

public char Separator { get; set; }

Property Value

char

SeparatorString

Gets and sets a string value as separator.

public string SeparatorString { get; set; }

Property Value

string

TrimLeadingBlankRowAndColumn

Indicates whether leading blank rows and columns should be trimmed like what ms excel does. Default is true.

public bool TrimLeadingBlankRowAndColumn { get; set; }

Property Value

bool

Remarks

Same with the rule in ms excel, a row/column will not be taken as blank if it has custom style, even if it contains no cell data. When saving with LightCells mode, this option takes no effect. User should control the output range by the implementation of Aspose.Cells.TxtSaveOptions.LightCellsDataProvider or by speicifing Aspose.Cells.TxtSaveOptions.ExportArea

TrimTailingBlankCells

Indicates whether tailing blank cells in one row should be trimmed. Default is false.

public bool TrimTailingBlankCells { get; set; }

Property Value

bool

Remarks

When saving with LightCells mode and the Aspose.Cells.TxtSaveOptions.ExportArea has not been specified, this option takes no effect and one row will be extended to just the last cell provided by the implementation Aspose.Cells.TxtSaveOptions.LightCellsDataProvider