Spread can open data or data and formatting from an XML file or a stream into the Spread component.
For more details on opening a Spread XML file, refer to the Open methods of the FpSpread class.
For instructions for saving Spread XML files, see Saving to a Spread XML File.
Using Code
Use the FpSpread class Open method, specifying the path and file name of the Spread XML file to open or the Stream object to open.
Example
This example code opens an existing Spread-compatible XML file in the component.
C# | Copy Code |
---|---|
// Open a Spread-compatible XML file. fpSpread1.Open("C:\\spreadfile.xml"); |
VB | Copy Code |
---|---|
' Open a Spread-compatible XML file. FpSpread1.Open("C:\spreadfile.xml") |
Using the Spread Designer
- From the File menu icon, select Open.
- A dialog appears warning you that this overwrites your existing settings if you open a file. Click Yes to continue with the file open.
The Open dialog appears.
- Change the Files of type box to XML files (*.xml).
- Specify the path and file name of the file to open, and then click Open.
If the file is opened successfully, a message appears stating the file has been opened.
- Click OK to close the Spread Designer.