PowerTools SPREAD for ASP.NET 8.0J
OpenExcel(Stream,Int32,Int32,ExcelOpenFlags,ExcelWarningList,String) メソッド

Excel Compound Storageファイルを含むストリーム
ExcelシートをロードするSpreadシートのインデックス
ロードするExcelシートのインデックス
スプレッドシートのロード部分
この操作中に発生する警告メッセージのリスト
パスワード
Excelファイルをストリームから開き、指定したExcelシートをSpreadコンポーネントの指定したシートにロードします。その際、ロードする部分を指定し、発生した警告を記録できます。
構文
'Declaration
 
Public Overloads Function OpenExcel( _
   ByVal stream As Stream, _
   ByVal spreadSheetIndex As Integer, _
   ByVal excelSheetIndex As Integer, _
   ByVal excelOpenFlags As ExcelOpenFlags, _
   ByVal warningList As ExcelWarningList, _
   ByVal password As String _
) As Boolean

パラメータ

stream
Excel Compound Storageファイルを含むストリーム
spreadSheetIndex
ExcelシートをロードするSpreadシートのインデックス
excelSheetIndex
ロードするExcelシートのインデックス
excelOpenFlags
スプレッドシートのロード部分
warningList
この操作中に発生する警告メッセージのリスト
password
パスワード
次のサンプルコードは、Excel形式のファイルをロードします。
string f;  
f = "C:\\savedinexcel.xls";  
System.IO.FileStream s = new System.IO.FileStream(f, IO.FileMode.Open, IO.FileAccess.Read);
FpSpread1.OpenExcel(s, 0, 0, FarPoint.Excel.ExcelOpenFlags.DataOnly, new FarPoint.Excel.ExcelWarningList,"test");
 
Dim f As String
f = "C:\savedinexcel.xls"
Dim s As New System.IO.FileStream(f, IO.FileMode.Open,IO.FileAccess.Read)
FpSpread1.OpenExcel(s, 0, 0, FarPoint.Excel.ExcelOpenFlags.DataOnly, New FarPoint.Excel.ExcelWarningList, "test")
参照

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

 

 


© 2003-2015, GrapeCity inc. All rights reserved.