ExportExcelFile

ExportExcelFile(string)

Esporta in un file excel.

public void ExportExcelFile(string fileName)

Esempi

[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

Guarda anche


ExportExcelFile(string, FileFormatType)

Esporta in un file excel.

public void ExportExcelFile(string fileName, FileFormatType fileFormatType)
ParametroTipoDescrizione
fileNameStringIl nome del file creato.
fileFormatTypeFileFormatTypeTipo di formato file Excel.

Guarda anche


ExportExcelFile(Stream)

Esporta in un flusso di file excel, incluso il flusso di I/O del disco o il flusso di memoria.

public void ExportExcelFile(Stream stream)

Esempi

[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

Guarda anche


ExportExcelFile(Stream, FileFormatType)

Esporta in un flusso di file excel, incluso il flusso di I/O del disco o il flusso di memoria.

public void ExportExcelFile(Stream stream, FileFormatType fileFormatType)
ParametroTipoDescrizione
streamStreamStream dove salvare il foglio di calcolo.
fileFormatTypeFileFormatTypeTipo di formato file Excel.

Guarda anche