Class LoadOptions

Class LoadOptions

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

Represents the options of loading the file.

public class LoadOptions

Inheritance

objectLoadOptions

Derived

AbstractTextLoadOptions, DbfLoadOptions, DifLoadOptions, JsonLoadOptions, NumbersLoadOptions, OdsLoadOptions, XmlLoadOptions

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

LoadOptions()

Creates an options of loading the file.

public LoadOptions()

LoadOptions(LoadFormat)

Creates an options of loading the file.

public LoadOptions(LoadFormat loadFormat)

Parameters

loadFormat LoadFormat

The loading format.

Fields

m_LoadFormat

protected LoadFormat m_LoadFormat

Field Value

LoadFormat

Properties

AutoFilter

Indicates whether auto filtering the data when loading the files.

public bool AutoFilter { get; set; }

Property Value

bool

Remarks

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

AutoFitterOptions

Gets and sets the auto fitter options

public AutoFitterOptions AutoFitterOptions { get; set; }

Property Value

AutoFitterOptions

Remarks

Only for xlsx ,spreadsheetML file now.

CheckDataValid

Check whether data is valid in the template file.

public bool CheckDataValid { get; set; }

Property Value

bool

CheckExcelRestriction

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.

public bool CheckExcelRestriction { get; set; }

Property Value

bool

CultureInfo

Gets or sets the system culture info at the time the file was loaded.

public CultureInfo CultureInfo { get; set; }

Property Value

CultureInfo

DefaultStyleSettings

Gets the default style settings for initializing styles of the workbook

public DefaultStyleSettings DefaultStyleSettings { get; }

Property Value

DefaultStyleSettings

FontConfigs

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

public IndividualFontConfigs FontConfigs { get; set; }

Property Value

IndividualFontConfigs

IgnoreNotPrinted

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

public bool IgnoreNotPrinted { get; set; }

Property Value

bool

Remarks

Only for xlsx file.

IgnoreUselessShapes

Indicates whether ignoring useless shapes.

public bool IgnoreUselessShapes { get; set; }

Property Value

bool

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.

InterruptMonitor

Gets and sets the interrupt monitor.

public AbstractInterruptMonitor InterruptMonitor { get; set; }

Property Value

AbstractInterruptMonitor

KeepUnparsedData

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

public bool KeepUnparsedData { get; set; }

Property Value

bool

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,

LanguageCode

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

public CountryCode LanguageCode { get; set; }

Property Value

CountryCode

LightCellsDataHandler

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

public LightCellsDataHandler LightCellsDataHandler { get; set; }

Property Value

LightCellsDataHandler

LoadFilter

The filter to denote how to load data.

public LoadFilter LoadFilter { get; set; }

Property Value

LoadFilter

LoadFormat

Gets the load format.

public LoadFormat LoadFormat { get; }

Property Value

LoadFormat

MemorySetting

Gets or sets the memory usage options.

public MemorySetting MemorySetting { get; set; }

Property Value

MemorySetting

ParsingFormulaOnOpen

Indicates whether parsing the formula when reading the file.

public bool ParsingFormulaOnOpen { get; set; }

Property Value

bool

Remarks

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

ParsingPivotCachedRecords

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

public bool ParsingPivotCachedRecords { get; set; }

Property Value

bool

Remarks

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

Password

Gets and set the password of the workbook.

public string Password { get; set; }

Property Value

string

PreservePaddingSpacesInFormula

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

public bool PreservePaddingSpacesInFormula { get; set; }

Property Value

bool

Remarks

After loading workbook from template file with this option, Aspose.Cells.FormulaSettings.PreservePaddingSpaces will be set to the same value with this property.

Region

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

public CountryCode Region { get; set; }

Property Value

CountryCode

Remarks

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

WarningCallback

Gets or sets warning callback.

public IWarningCallback WarningCallback { get; set; }

Property Value

IWarningCallback

Methods

SetPaperSize(PaperSizeType)

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

public void SetPaperSize(PaperSizeType type)

Parameters

type PaperSizeType

The default paper size.

Remarks

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