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

Excel Compound Document ファイルを含むストリーム。
SPREADの現在の入力マップキーをクリアします。
Excel Compound Documentファイルを開き、Spreadにロードします。
構文
'宣言
 
Public Overloads Function OpenExcel( _
   ByVal stream As Stream, _
   ByVal isClearInputMapKey As Boolean _
) As Boolean
public bool OpenExcel( 
   Stream stream,
   bool isClearInputMapKey
)

パラメータ

stream
Excel Compound Document ファイルを含むストリーム。
isClearInputMapKey
SPREADの現在の入力マップキーをクリアします。
例外
例外解説
System.ArgumentNullExceptionストリームが指定されていないか、指定されたストリームがNullです。
System.ArgumentExceptionストリームが指定されていないか、指定されたストリームが空です。
使用例
次のサンプルコードは、OpenExcelメソッドを使用します。
string f;
f = "D:\\savetostream.xls";
System.IO.FileStream s = new System.IO.FileStream(f, System.IO.FileMode.Open, System.IO.FileAccess.ReadWrite);
try
{
    fpSpread1.OpenExcel(s, true);
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message);
}
Dim f As String
f = "D:\savetostream.xls"
Dim s As New System.IO.FileStream(f, IO.FileMode.Open, IO.FileAccess.ReadWrite)
Try     
FpSpread1.OpenExcel(s, True)     
Catch ex As Exception     
MessageBox.Show(ex.Message)
End Try
参照

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

 

 


© MESCIUS inc. All rights reserved.