Saves the Excel document data to a System.IO.Stream with format and special password by .
Syntax
'Declaration
Public Overloads Sub Save( _
ByVal As System.String, _
Optional ByVal As ExcelFileType, _
Optional ByVal As System.String _
)
'Usage
Dim instance As ExcelOperator
Dim fileName As System.String
Dim workbookType As ExcelFileType
Dim password As System.String
instance.Save(fileName, workbookType, password)
public void Save(
System.string ,
ExcelFileType ,
System.string
)
Parameters
- fileName
-
The output excel file name.
- workbookType
- A ExcelFileType indicate the type of saved Excel file.
- password
- The password of the workbook. The default password is a null reference (Nothing in Visual Basic).
Exceptions
Exception | Description |
System.ArgumentException | contains only white space,
or contains one or more invalid characters as defined by Path.GetInvalidPathChars(). |
System.IO.PathTooLongException | The exceed the system-defined maximum length.
For example, on Windows-based platforms, paths must be less than 248 characters,
and file names must be less than 260 characters. |
System.IO.DirectoryNotFoundException | The specified is invalid, (for example, it is on an unmapped drive). |
System.IO.IOException | An I/O error occurred while opening the . |
System.UnauthorizedAccessException | specified a file that is read-only and access is not Read.
specified a directory.
The caller does not have the required permission. |
System.IO.FileNotFoundException | The specified in path was not found. |
System.NotSupportedException | is in an invalid format. |
See Also