GridDesktop.ExportExcelFile
Contents
[
Hide
]ExportExcelFile(Stream)
Exports to a excel file stream, including disk IO stream or memory stream.
public void ExportExcelFile(Stream stream)
Examples
[C#]
private void button1_Click(object sender, System.EventArgs e)
{
FileStream fs = new FileStream("d:\\bookx.xls", FileMode.OpenOrCreate);
try
{
gridDesktop1.Worksheets.ExportExcelFile(fs);
}
catch(Exception ex)
{
}
finally
{
fs.Close();
}
}
[Visual Basic]
Private Sub menuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuItem6.Click
Dim fs As FileStream = New FileStream("d:\bookx.xls", FileMode.OpenOrCreate)
Try
gridDesktop1.Worksheets.ExportExcelFile(fs)
Catch ex As Exception
Throw ex
Finally
fs.Close()
End Try
End Sub
See Also
- class GridDesktop
- namespace Aspose.Cells.GridDesktop
- assembly Aspose.Cells.GridDesktop
ExportExcelFile(Stream, FileFormatType)
Exports to a excel file stream, including disk IO stream or memory stream.
public void ExportExcelFile(Stream stream, FileFormatType fileFormatType)
Parameter | Type | Description |
---|---|---|
stream | Stream | Stream where to save the spreadsheet. |
fileFormatType | FileFormatType | Excel file format type. |
See Also
- enum FileFormatType
- class GridDesktop
- namespace Aspose.Cells.GridDesktop
- assembly Aspose.Cells.GridDesktop
ExportExcelFile(string)
Exports to an excel file.
public void ExportExcelFile(string fileName)
Examples
[C#]
private void button1_Click(object sender, System.EventArgs e)
{
gridDesktop1.Worksheets.ExportExcelFile("savedemo.xls");
}
[Visual Basic]
Private Sub menuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuItem7.Click
gridDesktop1.Worksheets.ExportExcelFile("savedemo.xls")
End Sub
See Also
- class GridDesktop
- namespace Aspose.Cells.GridDesktop
- assembly Aspose.Cells.GridDesktop
ExportExcelFile(string, FileFormatType)
Exports to a excel file.
public void ExportExcelFile(string fileName, FileFormatType fileFormatType)
Parameter | Type | Description |
---|---|---|
fileName | String | The name of created file. |
fileFormatType | FileFormatType | Excel file format type. |
See Also
- enum FileFormatType
- class GridDesktop
- namespace Aspose.Cells.GridDesktop
- assembly Aspose.Cells.GridDesktop