Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example exports the data of a three-column (colA, colB, colC), two-row (row1, row2) sheet range to an XML file called "test.xml". The export does not create a log file. The resulting XML file will contain the following structure:

<root_element>
    <collection_element>
        <A>colA_row1_data</A>
        <B>colB_row1_data</B>
        <C>colC_row1_data</C>
    </collection_element>
    <collection_element>
        <A>colA_row2_data</A>
        <B>colB_row2_data</B>
        <C>colC_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.ExportRangeToXML(1, 1, 3, 2, "C:\Samples\test.xml", "root_element", "collection_element", ExportToXMLFormattedData, "");

Visual Basic

ret = fpSpread1.ExportRangeToXML(1, 1, 3, 2, "C:\Samples\test.xml", "root_element", "collection_element", ExportToXMLFormattedData, "")

Copyright © GrapeCity, inc. All rights reserved.