Spread WPF 17
GrapeCity.Excel Namespace / ExcelWorkbook Class / Save Method / Save(String,ExcelFileType,String) Method
The file name the workbook will be saved in.
the ExcelFileType specifics the file type. there are two major file type in Excel, if you want to save an Excel 97-2003 compatible file, use GrapeCity.Excel.ExcelFileType.Biff, otherwise, use ExcelFileType.OpenXML to save a Excel 2007 or later file.
The password which will be used to encrypt the file.


In This Topic
    Save(String,ExcelFileType,String) Method
    In This Topic
    Save the workbook to file, 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, _
       ByVal fileFormat As ExcelFileType, _
       Optional ByVal password As String _
    ) 
    'Usage
     
    Dim instance As ExcelWorkbook
    Dim file As String
    Dim fileFormat As ExcelFileType
    Dim password As String
     
    instance.Save(file, fileFormat, password)
    public void Save( 
       string file,
       ExcelFileType fileFormat,
       string password
    )

    Parameters

    file
    The file name the workbook will be saved in.
    fileFormat
    the ExcelFileType specifics the file type. there are two major file type in Excel, if you want to save an Excel 97-2003 compatible file, use GrapeCity.Excel.ExcelFileType.Biff, otherwise, use ExcelFileType.OpenXML to save a Excel 2007 or later file.
    password
    The password which will be used to encrypt the file.
    Exceptions
    ExceptionDescription
    Throw when the file has invalid extension.
    Remarks
    It will check whether the file extension is matched with the ExcelFileType parameter. That is to say, if the value of the fileFormat is ExcelFileType.BIFF, the extension of file should be .xls, and so on.
    See Also