Spread ASP.NET 6.0 Product Documentation
Save(Stream,Boolean) Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class > Save Method : Save(Stream,Boolean) Method


stream
Stream to which to save
dataOnly
Whether to save only data

Glossary Item Box

Saves the contents of the sheet to XML in the specified stream.

Syntax

Visual Basic (Declaration) 
Public Overloads Function Save( _
   ByVal stream As Stream, _
   ByVal dataOnly As Boolean _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim stream As Stream
Dim dataOnly As Boolean
Dim value As Boolean
 
value = instance.Save(stream, dataOnly)
C# 
public bool Save( 
   Stream stream,
   bool dataOnly
)

Parameters

stream
Stream to which to save
dataOnly
Whether to save only data

Return Value

Boolean: true if successful; false otherwise

Example

This example shows how to save to a stream.
C#Copy Code
System.IO.Stream streamXMLDOSheet;
System.IO.Stream streamXMLSheet;

string StreamNameXMLSheet = "C:\\XML\\StreamXMLSheet.xml";
streamXMLSheet = File.Open(StreamNameXMLSheet, FileMode.Create);
FpSpread1.ActiveSheetView.Save(streamXMLSheet, false);
streamXMLSheet.Close();
streamXMLSheet = null;

string StreamNameXMLDOSheet = "C:\\XML\\StreamXMLDataOnlySheet.xml";
streamXMLDOSheet = File.Open(StreamNameXMLDOSheet, FileMode.Create);
FpSpread1.ActiveSheetView.Save(streamXMLDOSheet, true);
streamXMLDOSheet.Close();
streamXMLDOSheet = null;
Visual BasicCopy Code
Dim streamXMLDOSheet As System.IO.Stream
Dim streamXMLSheet As System.IO.Stream

Dim StreamNameXMLSheet As String = "C:\XML\StreamXMLSheet.xml"
streamXMLSheet = File.Open(StreamNameXMLSheet, FileMode.Create)
FpSpread1.ActiveSheetView.Save(streamXMLSheet, False)
streamXMLSheet.Close()
streamXMLSheet = Nothing

Dim StreamNameXMLDOSheet As String = "C:\XML\StreamXMLDataOnlySheet.xml"
streamXMLDOSheet = File.Open(StreamNameXMLDOSheet, FileMode.Create)
FpSpread1.ActiveSheetView.Save(streamXMLDOSheet, True)
streamXMLDOSheet.Close()
streamXMLDOSheet = Nothing

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.