FarPoint.Win.SpreadJ アセンブリ > FarPoint.Win.Spread.Model 名前空間 > SpreadSerializer クラス > IsSpreadXmlFile メソッド : IsSpreadXmlFile(Stream) メソッド |
'Declaration Public Overloads Shared Function IsSpreadXmlFile( _ ByVal stream As Stream _ ) As Boolean
'使用法 Dim stream As Stream Dim value As Boolean value = SpreadSerializer.IsSpreadXmlFile(stream)
このメソッドは、ソースが本当に Spread データを含む XML ストリームかどうかを確かめる場合に使用します。
FarPoint.Win.Spread.Model.SpreadSerializer s = new FarPoint.Win.Spread.Model.SpreadSerializer(); System.IO.Stream stream; stream = System.IO.File.Open("D:\\SpreadFiles\\file01.xml", System.IO.FileMode.Open); bool b = s.IsSpreadXmlFile(stream); MessageBox.Show("The file is a Spread XML file is " + b.ToString());
Dim s As New FarPoint.Win.Spread.Model.SpreadSerializer Dim stream As System.IO.Stream stream = System.IO.File.Open("D:\SpreadFiles\file01.xml", System.IO.FileMode.Open) Dim b As Boolean = s.IsSpreadXmlFile(stream) MessageBox.Show("The file is a Spread XML file is " & b.ToString)