Message-ID: <596508589.9911.1711706543807.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9910_523522164.1711706543807" ------=_Part_9910_523522164.1711706543807 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html ExcelApplication.Open(String, String)

ExcelApplication.Open(String, String)

Descrip= tion

=20

Opens an existing Excel spreadsheet.

=20
C#
=20
 public virtual Workbook Open(System.String fileName, System.String decrypt=
Password)
=20
=20
vb.net
=20
Public Overridable Function Open(ByVal fileName As String, ByVal decryptPas=
sword As String) As Workbook
=20
=20

Parameters

= =20
fileName
The = path and name of the file to open. The path can be relative or absolute. Th= e file must be a OOXML format (Excel 2007 or later) .xlsx file or BIFF8 for= mat (Excel 97 or later) .xls file.=20
decryptPass= word
The password used to encrypt the spreadsheet. Standard "Offi= ce 97/2000 Compatible" encryption is used to encrypt the spreadsheet. = This is the default encryption used by Excel 97 and later versions.=20

Returns

A=20 Workbook object rep= resenting the file opened.=20

Exceptions

= =20
System.Exc= eption
If the file cannot be found or opened, or if the file is not a = OOXML format (Excel 2007 or later) .xlsx or BIFF8 format (Excel 97 or later= ) .xls file.=20
ArgumentE= xception
If=20 decryptPassword is not the password that can decrypt the workb= ook.=20

Remarks

=20

ExcelWriter supports Excel's OOXML (Excel 2007 or later) and BIFF8 (Exce= l 97 or later) format only. Do not use this method to open BIFF7 (Excel 95)= files.

=20

Note that ExcelWriter will not automatically re-encrypt a workbook that = was opened with this method. If you want to ensure that your workbook is en= crypted when saved, set the EncryptPassword property.

=20

Examples

=20
C#
=20

          ExcelApplication xla =3D new ExcelApplication();
          Workbook wb =3D xla.Open(@"C:\Reports\Report.xlsx", &qu=
ot;MyPassword");
        
=20
=20
vb.net
=20

          Dim xla As New ExcelApplication()
          Dim wb As Workbook =3D xla.Open("C:\Reports\Report.xlsx"=
;, "MyPassword")
        
=20
------=_Part_9910_523522164.1711706543807--