'Declaration Public Overloads Function OpenExcel( _ ByVal stream As Stream, _ ByVal password As String _ ) As Boolean
Parameters
- stream
- Stream that contains an Excel Compound Document File
- password
- File password
'Declaration Public Overloads Function OpenExcel( _ ByVal stream As Stream, _ ByVal password As String _ ) As Boolean
Exception | Description |
---|---|
System.ArgumentNullException | No stream specified or specified stream is null |
System.ArgumentException | No stream specified or specified stream is empty |
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