Saving Files
Different Ways to Save Files
Aspose.Cells provides the Workbook which represents a Microsoft Excel file and provides methods necessary to work with Excel files. The Workbook 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 Workbook 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 Workbook object’s Save method. Specify the desired file format using the SaveFormat enumeration when calling the Save method.
Saving File to PDF
To save the desired content to a PDF file using the Aspose.Cells for C++ library, create a new Workbook object or construct a Workbook object by reading an existing Excel file, and then Save the file to PDF by calling the Save method of the Workbook object. When calling the Save method, use the SaveFormat enumeration to specify the desired file format.