ExportExcelFile
Innehåll
[
Dölj
]ExportExcelFile(string)
Exporterar till en excel-fil.
public void ExportExcelFile(string fileName)
Exempel
[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
Se även
- class GridDesktop
- namnutrymme Aspose.Cells.GridDesktop
- hopsättning Aspose.Cells.GridDesktop
ExportExcelFile(string, FileFormatType)
Exporterar till en excel-fil.
public void ExportExcelFile(string fileName, FileFormatType fileFormatType)
Parameter | Typ | Beskrivning |
---|---|---|
fileName | String | Namnet på den skapade filen. |
fileFormatType | FileFormatType | Excel-filformatstyp. |
Se även
- enum FileFormatType
- class GridDesktop
- namnutrymme Aspose.Cells.GridDesktop
- hopsättning Aspose.Cells.GridDesktop
ExportExcelFile(Stream)
Exporterar till en Excel-filström, inklusive disk-IO-ström eller minnesström.
public void ExportExcelFile(Stream stream)
Exempel
[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
Se även
- class GridDesktop
- namnutrymme Aspose.Cells.GridDesktop
- hopsättning Aspose.Cells.GridDesktop
ExportExcelFile(Stream, FileFormatType)
Exporterar till en Excel-filström, inklusive disk-IO-ström eller minnesström.
public void ExportExcelFile(Stream stream, FileFormatType fileFormatType)
Parameter | Typ | Beskrivning |
---|---|---|
stream | Stream | Streama var du kan spara kalkylarket. |
fileFormatType | FileFormatType | Excel-filformatstyp. |
Se även
- enum FileFormatType
- class GridDesktop
- namnutrymme Aspose.Cells.GridDesktop
- hopsättning Aspose.Cells.GridDesktop