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

ExcelApplication.Open(System.IO.Stream)

Desc= ription

=20

Opens an Excel workbook from a stream and returns a Workbook object.

=20
C#
=20
 public virtual Workbook Open(System.IO.Stream stream)
=20
=20
vb.net
=20
Public Overridable Function Open(ByVal stream As System.IO.Stream) As Workb=
ook
=20
=20

Parameters=20

stream
A Sys= tem.IO.Stream containing a OOXML format (Excel 2007 or later) .xlsx or BIFF= 8 format (Excel 97 or later) .xls file.=20

Returns

A= =20 Workbook object representing the file opened.=20

Exceptions=20

System.= Exception
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 la= ter) .xls file.=20

Remarks

Exc= elWriter supports Excel's OOXML (Excel 2007 or later) and BIFF8 (Excel 97 o= r later) format only. Do not use this method to open BIFF7 (Excel 95) files= .=20

Examples

= =20
C#
=20

          ExcelApplication xla =3D new ExcelApplication();
          FileStream fStrm =3D new FileStream(@"C:\Sales\2003\June.xls=
x", FileMode.Open);
          Workbook wb =3D xla.Open(fStrm);
        
=20
=20
vb.net
=20

          Dim xla As New ExcelApplication()
          Dim fStrm As FileStream =3D New FileStream("C:\Sales\2003\Ju=
ne.xlsx", FileMode.Open)
          Dim wb As Workbook =3D xla.Open(fStrm)
        
=20
------=_Part_8542_1939116436.1711649448348--