Click or drag to resize
LoadOptions Class
Represents a base class for loading options of various file formats.
Inheritance Hierarchy
SystemObject
  GemBox.SpreadsheetLoadOptions
    More...

Namespace:  GemBox.Spreadsheet
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 41.3.30.1032
Syntax
public abstract class LoadOptions

The LoadOptions type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberCsvDefault
Gets the default options for loading from Character Separated Values file format.
Public propertyStatic memberHtmlDefault
Gets the default options for loading from HyperText Markup Language File (HTML) format.
Public propertyStatic memberOdsDefault
Gets the default options for loading from OpenDocument Spreadsheet file format.
Public propertyStatic memberXlsDefault
Gets the default options for loading from XLS file format (Microsoft Excel Spreadsheet format; Excel 2003 and prior versions) .
Public propertyStatic memberXlsxDefault
Gets the default options for loading from XLSX file format (Microsoft Excel Open XML Spreadsheet; Excel 2007 and later).
Top
Remarks
Examples

Following code demonstrates different ways of loading ExcelFile.

// Loads a spreadsheet from a file with the specified path
ExcelFile ef = ExcelFile.Load(fileName);

using (FileStream stream = new FileStream(fileName, FileMode.Open))
{
    // Loads a spreadsheet from the specified stream
    ef = ExcelFile.Load(stream, LoadOptions.XlsxDefault);
}

// Loads a spreadsheet using specified options
ef = ExcelFile.Load(fileName, new XlsxLoadOptions() { PreserveUnsupportedFeatures = false });
See Also
Inheritance Hierarchy