Export Microsoft Excel File

Export Excel Files

Export as a File

To save the content of Aspose.Cells.GridWeb control as an Excel file:

  1. Add the Aspose.Cells.GridWeb control to your web form.
  2. Save your work as an Excel file at a specified path.
  3. Run the application.

When Aspose.Cells.GridWeb control is added to a windows form, the control is automatically instantiated and added to the form with a default size. You don’t have to create an Aspose.Cells.GridWeb control object, all you have to do is drag and drop the control and start using it.

The code example below illustrates how to save grid content to an Excel file.

The above code snippet can be used in several ways. A common way is to add a button that saves the grid content to an Excel file when clicked. Aspose.Cells.GridWeb offers an easier approach for task. Aspose.Cells.GridWeb has an event called SaveCommand. The above code snippet can be added to the SaveCommand event’s event handler which allow users to save their work by clicking the Aspose.Cells.GridWeb’s in-built Save button.

The GridWeb’s SaveCommand event

todo:image_alt_text

Saving grid content to Excel by clicking GridWeb’s in-built Save button

todo:image_alt_text

Export as a Stream

It is also possible to save grid content to a stream (for example MemoryStream).