Spread Windows Forms 6.0 Product Documentation
IsSpreadXmlFile(String) Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > SpreadSerializer Class > IsSpreadXmlFile Method : IsSpreadXmlFile(String) Method


fileName
Path and file name to consider as a source of Spread XML

Glossary Item Box

Determines whether the specified file contains a top-level Spread XML node.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function IsSpreadXmlFile( _
   ByVal fileName As String _
) As Boolean
Visual Basic (Usage)Copy Code
Dim fileName As String
Dim value As Boolean
 
value = SpreadSerializer.IsSpreadXmlFile(fileName)
C# 
public static bool IsSpreadXmlFile( 
   string fileName
)

Parameters

fileName
Path and file name to consider as a source of Spread XML

Return Value

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

Remarks

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

Example

This example checks if a file is a Spread XML file.
C#Copy Code
FarPoint.Win.Spread.Model.SpreadSerializer s = new FarPoint.Win.Spread.Model.SpreadSerializer();
bool b = s.IsSpreadXmlFile("D:\\SpreadFiles\\file01.xml");
MessageBox.Show("The file is a Spread XML file is " + b.ToString());
Visual BasicCopy Code
Dim s As New FarPoint.Win.Spread.Model.SpreadSerializer
Dim b As Boolean = s.IsSpreadXmlFile("D:\SpreadFiles\file01.xml")
MessageBox.Show("The file is a Spread XML file is " & b.ToString)

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.