Spread WPF 17
GrapeCity.Excel Namespace / ExcelWorkbook Class / Save Method / Save(String,String) Method
The full path of file name which the workbook will be saved
The password which will be used to encrypt the file.


In This Topic
    Save(String,String) Method
    In This Topic
    Save the workbook to stream, it will use the specified file type as the file format, the file will be encrypt if the password is not null.
    Syntax
    'Declaration
     
    Public Overloads Sub Save( _
       ByVal file As String, _
       Optional ByVal password As String _
    ) 
    'Usage
     
    Dim instance As ExcelWorkbook
    Dim file As String
    Dim password As String
     
    instance.Save(file, password)
    public void Save( 
       string file,
       string password
    )

    Parameters

    file
    The full path of file name which the workbook will be saved
    password
    The password which will be used to encrypt the file.
    Exceptions
    ExceptionDescription
    throw when the file has invalid extension.
    Remarks
    This method will use the file extension to determine the file type. If it has .xls extension it will save the file in Excel 97-2003 compatible format. If it has .xlsx extension, it will save in Excel 2007 format, OpenXML in this case.
    See Also