Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example saves the data of a three-column, two-row sheet to an XML file called "test.xml". The XML file will contain the following structure:

<root_element>
    <collection_element>
        <A>col1_row1_data</A>
        <B>col2_row1_data</B>
        <C>col3_row1_data</C>
    </collection_element>
    <collection_element>
        <A>col1_row2_data</A>
        <B>col2_row2_data</B>
        <C>col3_row2_data</C>
    </collection_element>
</root_element>

To use this sample, change the path in the code to the path for your product installation's \SAMPLES directory.

C++

ret = m_Spread1.ExportToXML("C:\Samples\test.xml", "root_element", "collection_element", ExportToXMLFormattedData, "c:\test\test.log");

Visual Basic

ret = fpSpread1.ExportToXML("C:\Samples\test.xml", "root_element", "collection_element", ExportToXMLFormattedData, "c:\test\test.log")

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.