Spread WPF Documentation
SaveXml(Stream) Method
Example 


The XML stream.
Saves the worksheet to an XML stream.
Syntax
'Declaration
 
Public Overloads Sub SaveXml( _
   ByVal xmlStream As System.IO.Stream _
) 
'Usage
 
Dim instance As Worksheet
Dim xmlStream As System.IO.Stream
 
instance.SaveXml(xmlStream)
public void SaveXml( 
   System.IO.Stream xmlStream
)

Parameters

xmlStream
The XML stream.
Example
This example uses the SaveXml method.
Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.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 Microsoft.Win32.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
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

Worksheet Class
Worksheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.