MESCIUS SPREAD for Windows Forms 15.0J
OpenExcel(Stream,Int32,String) メソッド
使用例 

ストリーム
ファイルからロードするシートのインデックス
パスワード
Excelストリームを開き、そのストリームから(番号によって)指定したシートをこのシートにロードします。
構文
'宣言
 
Public Overloads Function OpenExcel( _
   ByVal stream As Stream, _
   ByVal excelSheetIndex As Integer, _
   ByVal password As String _
) As Boolean

パラメータ

stream
ストリーム
excelSheetIndex
ファイルからロードするシートのインデックス
password
パスワード

戻り値の型

成功した場合はTRUE。それ以外の場合はFALSE。
使用例
次のサンプルコードは、Excelファイルを開きます。
string fileName;
fileName = "c:\\book1.xlsx";
System.IO.Stream stream;
stream = System.IO.File.Open(fileName, System.IO.FileMode.Open);
fpSpread1.Sheets[0].OpenExcel(stream, 0, "test");
Dim fileName As String
fileName = "c:\book1.xlsx"
Dim stream As System.IO.Stream
stream = System.IO.File.Open(fileName, System.IO.FileMode.Open)
fpSpread1.Sheets(0).OpenExcel(stream, 0, "test")
参照

SheetView クラス
SheetView メンバ
オーバーロード一覧

 

 


© MESCIUS inc. All rights reserved.