Spread Windows Forms 17
GrapeCity.Spreadsheet Assembly / GrapeCity.Spreadsheet Namespace / Workbook Class / SaveAs Method / SaveAs(Stream,FileFormat,String,ExportContext) Method
A System.IO.Stream object indicates the stream to save to.
A GrapeCity.Spreadsheet.IO.FileFormat value indicates the file format when saving the workbook.
A case-sensitive string (no more than 15 characters) that indicates the protection password to be given to the file.
An GrapeCity.Spreadsheet.IO.OpenXml.ExportContext object indicates the export context.


In This Topic
    SaveAs(Stream,FileFormat,String,ExportContext) Method
    In This Topic
    Saves this Workbook to the specified System.IO.Stream.
    Syntax
    'Declaration
     
    
    Public Overloads Function SaveAs( _
       ByVal stream As Stream, _
       Optional ByVal fileFormat As FileFormat, _
       Optional ByVal password As String, _
       Optional ByVal context As ExportContext _
    ) As Boolean
    'Usage
     
    
    Dim instance As Workbook
    Dim stream As Stream
    Dim fileFormat As FileFormat
    Dim password As String
    Dim context As ExportContext
    Dim value As Boolean
     
    value = instance.SaveAs(stream, fileFormat, password, context)

    Parameters

    stream
    A System.IO.Stream object indicates the stream to save to.
    fileFormat
    A GrapeCity.Spreadsheet.IO.FileFormat value indicates the file format when saving the workbook.
    password
    A case-sensitive string (no more than 15 characters) that indicates the protection password to be given to the file.
    context
    An GrapeCity.Spreadsheet.IO.OpenXml.ExportContext object indicates the export context.

    Return Value

    true if this workbook is saved successful, false otherwise.
    See Also