Spread Windows Forms 6.0 Product Documentation
Saving to a Spread XML File
Support Options
Spread Windows Forms 6.0 Product Documentation > Developer's Guide > Managing File Operations > Saving Data to a File > Saving to a Spread XML File

Glossary Item Box

You can save the data or the data and formatting in a Spread component to a Spread XML file or to a stream. When you save, all sheets in the component are saved to the file or stream. If you choose to save the formatting, the data saved includes formatting characters, such as currency symbols, and other information such as cell types are also saved.

For more details on the methods used, refer to the Save methods of the FpSpread class.

For instructions for opening Spread-compatible XML files, see Opening a Spread XML File.

Return to Saving Data to a File.

Return to the overview of Managing File Operations.

Using Code

Use the Save method of the FpSpread component specifying the path and file name of the Spread XML file or the Stream object, and whether to save data only.

Example

This example code saves the data and formatting in a Spread component to a Spread XML file.

C# Copy Code
// Save the data and formatting to an XML file.
 
fpSpread1.Save("C:\\SpWinFile1.xml", false);
 
VB Copy Code
' Save the data and formatting to an XML file.
 
FpSpread1.Save("C:\SpWinFile1.xml", False)
 

Using the Spread Designer

  1. From the File menu icon, choose Save.

    The Save As dialog appears.

  2. Change the Save as type box to XML files (*.xml).
  3. Specify the path and file name to which to save the file, and then click Save.

    If the file is saved successfully, a message appears stating the file has been saved.

  4. Click OK to close the Spread Designer.
© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.