Spread Silverlight Documentation
SaveXml(Stream,Boolean) Method
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class > SaveXml Method : SaveXml(Stream,Boolean) Method
The memory stream.
Specifies whether to only save data.
Saves the worksheet to an XML stream.
Syntax
'Declaration
 
Public Overloads Sub SaveXml( _
   ByVal xmlStream As System.IO.Stream, _
   ByVal dataOnly As System.Boolean _
) 
'Usage
 
Dim instance As Worksheet
Dim xmlStream As System.IO.Stream
Dim dataOnly As System.Boolean
 
instance.SaveXml(xmlStream, dataOnly)
public void SaveXml( 
   System.IO.Stream xmlStream,
   System.bool dataOnly
)

Parameters

xmlStream
The memory stream.
dataOnly
Specifies whether to only save data.
Example
This example uses the SaveXml method.
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "Xml File (.xml)|*.xml";
bool? useClick = saveFileDialog.ShowDialog();
if (useClick == true)
{
    var stream = saveFileDialog.OpenFile();
    gcSpreadSheet1.Sheets[0].SaveXml(stream);
    //gcSpreadSheet1.Sheets[0].SaveXml(stream, true);
    stream.Dispose();
}
Dim saveFileDialog = New SaveFileDialog()
saveFileDialog.Filter = "Xml File(.xml)|*.xml"
Dim useClick As Boolean = saveFileDialog.ShowDialog()
        If (useClick = True) Then
Dim stream = saveFileDialog.OpenFile()
stream.Seek(0, IO.SeekOrigin.Begin)
GcSpreadSheet1.Sheets(0).SaveXml(stream)
'GcSpreadSheet1.Sheets(0).SaveXml(stream, True)
        End If
See Also

Reference

Worksheet Class
Worksheet Members
Overload List