Spread WPF Documentation
OpenExcel(Stream) Method
Example 


The file stream.
Opens an Excel Compound Document File and loads it into GcSpreadSheet.
Syntax
'Declaration
 
Public Overloads Sub OpenExcel( _
   ByVal stream As System.IO.Stream _
) 
'Usage
 
Dim instance As GcSpreadSheet
Dim stream As System.IO.Stream
 
instance.OpenExcel(stream)
public void OpenExcel( 
   System.IO.Stream stream
)

Parameters

stream
The file stream.
Example
This example uses the OpenExcel method.
string f;
f = "c:\\zipfile\\test1.xlsx";
// Open an existing file named test1.xlsx
System.IO.FileStream s = new System.IO.FileStream(f, System.IO.FileMode.Open, System.IO.FileAccess.ReadWrite);
gcSpreadSheet1.OpenExcel(s);
//gcSpreadSheet1.OpenExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelOpenFlags.RowAndColumnHeaders);
//gcSpreadSheet1.OpenExcel(s, "12Test9");
//gcSpreadSheet1.OpenExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelOpenFlags.RowAndColumnHeaders, "12Test9");
s.Close();
gcSpreadSheet1.Invalidate();
Dim f As String
f = "c:\zipfile\test1.xlsx"
' Open an existing file named test1.xlsx
Dim s As New System.IO.FileStream(f, System.IO.FileMode.Open, System.IO.FileAccess.ReadWrite)
GcSpreadSheet1.OpenExcel(s)
'GcSpreadSheet1.OpenExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelOpenFlags.RowAndColumnHeaders)
'GcSpreadSheet1.OpenExcel(s, "12Test9")
'GcSpreadSheet1.OpenExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelOpenFlags.RowAndColumnHeaders, "12Test9")
s.Close()
GcSpreadSheet1.Invalidate()
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.