Spread Silverlight Documentation
SaveXml(Stream,Boolean) Method
Example 


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";          
gcSpreadSheet1.Invalidate();    

private void button1_Click(object sender, RoutedEventArgs e)
        {
            string fileName = "c:\\zipfile\\myser.xml";
            System.IO.Stream stream = System.IO.File.Open(fileName, System.IO.FileMode.Create);
            gcSpreadSheet1.SaveXml(stream);
            gcSpreadSheet1.Invalidate();
        }
GcSpreadSheet1.Sheets(0).Cells(0, 0, 2, 2).Text = "Test"          
GcSpreadSheet1.Invalidate()   

Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        Dim fileName As String
        Dim stream As System.IO.Stream
        fileName = "c:\zipfile\myser.xml"
        stream = System.IO.File.Open(fileName, System.IO.FileMode.Create)
        GcSpreadSheet1.SaveXml(stream)
       'GcSpreadSheet1.SaveXml(stream, True)
        GcSpreadSheet1.Invalidate()
    End Sub
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.