Spread Windows Forms 12.0 Product Documentation
IsSpreadXmlFile(Stream) Method
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > SpreadSerializer Class > IsSpreadXmlFile Method : IsSpreadXmlFile(Stream) Method
Stream to consider as a source of Spread XML
Determines whether the specified stream contains a top-level Spread XML node.
Syntax
'Declaration
 
Public Overloads Shared Function IsSpreadXmlFile( _
   ByVal stream As Stream _
) As Boolean
'Usage
 
Dim stream As Stream
Dim value As Boolean
 
value = SpreadSerializer.IsSpreadXmlFile(stream)
public static bool IsSpreadXmlFile( 
   Stream stream
)

Parameters

stream
Stream to consider as a source of Spread XML

Return Value

True if the specified Spread XML stream contains a top-level Spread XML node; false otherwise
Remarks

Use this method to consider whether the source is indeed an XML stream with Spread data.

Example
This example checks if a file is a Spread XML file.
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)
See Also

Reference

SpreadSerializer Class
SpreadSerializer Members
Overload List