Spread Silverlight Documentation
Open(String,Int32,String) Method


GrapeCity.Excel Namespace > ExcelOperator Class > Open Method : Open(String,Int32,String) Method
The excel document file name.
The index of loading ExcelWorksheet. If it's less that 0, means load all sheets.
The password to open the workbook. The default password is a null reference (Nothing in Visual Basic).
Open an Excel document and load the worksheet which indicated by sheetIndex with password.
Syntax
'Declaration
 
Public Overloads Sub Open( _
   ByVal file As System.String, _
   Optional ByVal sheetIndex As System.Integer, _
   Optional ByVal password As System.String _
) 
'Usage
 
Dim instance As ExcelOperator
Dim file As System.String
Dim sheetIndex As System.Integer
Dim password As System.String
 
instance.Open(file, sheetIndex, password)
public void Open( 
   System.string file,
   System.int sheetIndex,
   System.string password
)

Parameters

file
The excel document file name.
sheetIndex
The index of loading ExcelWorksheet. If it's less that 0, means load all sheets.
password
The password to open the workbook. The default password is a null reference (Nothing in Visual Basic).
Exceptions
ExceptionDescription
file contains only white space, or contains one or more invalid characters as defined by Path.GetInvalidPathChars().
The file 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.
The specified file is invalid, (for example, it is on an unmapped drive).
An I/O error occurred while opening the file.
file specified a file that is read-only and access is not Read. file specified a directory. The caller does not have the required permission.
The file specified in path was not found.
file is in an invalid format.
See Also

Reference

ExcelOperator Class
ExcelOperator Members
Overload List