次のサンプルコードは、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, "test");
}
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, "test")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try