Different Ways to Open Files

How to Open an Excel File via a Path

Developers can open a Microsoft Excel file using its file path on the local computer by specifying it in the Workbook class constructor. Simply pass the path in the constructor as a string. Aspose.Cells will automatically detect the file format type.

How to Open an Excel File via a Stream

It is also simple to open an Excel file as a stream. To do so, use an overloaded version of the constructor that takes the Stream object that contains the file.

How to Open a File with Data Only

To open a file with data only, use the LoadOptions and LoadFilter classes to set the related attributes and options for the template file to be loaded.

How to Load Visible Sheets Only

While loading a Workbook, you may only need data in visible worksheets in a workbook. Aspose.Cells allows you to skip data in invisible worksheets while loading a workbook. To do this, create a custom class that inherits the LoadFilter class and pass its instance to the LoadOptions.LoadFilter property.

Here is the implementation of the CustomLoad class referenced in the above snippet.