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 As System.String, _
ByVal As ExcelFileType, _
Optional ByVal As System.String _
)
'Usage
Dim instance As ExcelWorkbook
Dim file As System.String
Dim fileFormat As ExcelFileType
Dim password As System.String
instance.Save(file, fileFormat, password)
public void Save(
System.string ,
ExcelFileType ,
System.string
)
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
Exception | Description |
System.InvalidOperationException | Throw when the file has invalid extension. |
See Also