Saving Files

Different Ways to Save Files

Aspose.Cells provides the IWorkbook which represents a Microsoft Excel file and provides methods necessary to work with Excel files. The IWorkbook class provides the Save method used to save Excel files. The Save method has many overloads that are used to save files in different ways. The file format that the file is saved to is decided by the SaveFormat enumeration.

Saving File to Some Location

To save files to a storage location, specify the file name (complete with storage path) and the desired file format (from the SaveFormat enumeration) when calling the IWorkbook object’s Save method.

Saving File to Stream

To save files to a stream, create a MemoryStream or FileStream object and save the file to that stream object by calling the IWorkbook object’s Save method. Specify the desired file format using the SaveFormat enumeration when calling the Save method.