Spread Windows Forms 17
Spread Windows Forms 17.0 Product Documentation / Developer's Guide / File Operations / Opening Existing Files / Opening a Spread XML File
In This Topic
    Opening a Spread XML File
    In This Topic

    Spread can open data or data and formatting from a Spread-compatible 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 or the Open methods of the SheetView 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

    1. From the File menu, select Open.
    2. 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.

    3. Change the Files of type box to XML files (*.xml).
    4. 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.

    5. Click OK to close the Spread Designer.
    See Also