GridDesktop.ExportExcelFile

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


ExportExcelFile(Stream, FileFormatType)

Exports to a excel file stream, including disk IO stream or memory stream.

public void ExportExcelFile(Stream stream, FileFormatType fileFormatType)
ParameterTypeDescription
streamStreamStream where to save the spreadsheet.
fileFormatTypeFileFormatTypeExcel file format type.

See Also


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


ExportExcelFile(string, FileFormatType)

Exports to a excel file.

public void ExportExcelFile(string fileName, FileFormatType fileFormatType)
ParameterTypeDescription
fileNameStringThe name of created file.
fileFormatTypeFileFormatTypeExcel file format type.

See Also