Spread Silverlight Documentation
SaveXml(Stream,Boolean) Method
Example 


GrapeCity.Windows.SpreadSheet.UI Namespace > GcSpreadSheet Class > SaveXml Method : SaveXml(Stream,Boolean) Method
The XML stream.
Whether to save data only.
Saves the data on the sheet to the specified XML stream.
Syntax
'Declaration
 
Public Overloads Sub SaveXml( _
   ByVal xmlStream As System.IO.Stream, _
   ByVal dataOnly As System.Boolean _
) 
'Usage
 
Dim instance As GcSpreadSheet
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 XML stream.
dataOnly
Whether to save data only.
Example
This example uses the SaveXml method.
gcSpreadSheet1.Sheets[0].Cells[0, 0, 2, 2].Text = "Test";

SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "Xml File (.xml)|*.xml";
bool? useClick = saveFileDialog.ShowDialog();
if (useClick == true)
{
    var stream = saveFileDialog.OpenFile();
    gcSpreadSheet1.SaveXml(stream);
    //gcSpreadSheet1.SaveXml(stream, true);
    stream.Dispose();
}
GcSpreadSheet1.Sheets(0).Cells(0, 0, 2, 2).Text = "Test"

Dim saveFileDialog = New SaveFileDialog()
saveFileDialog.Filter = "Xml File(.xml)|*.xml"
Dim useClick As Boolean = saveFileDialog.ShowDialog()
If (useClick = True) Then
    Dim stream = saveFileDialog.OpenFile()
    GcSpreadSheet1.SaveXml(stream)
    'GcSpreadSheet1.SaveXml(stream, True)
End If
See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members
Overload List