Methods and systems are provided for importing markup language formatted
data into a spreadsheet document and for exporting markup language
formatted data from a spreadsheet document. XML data is associated with
an XML schema file defining XML data types and data type definitions for
applying XML data to the document. An XML data map is prepared that
relates that any XML data applied to the document back to corresponding
XML elements or attributes defined in the associated schema file. When
the document is imported into a spreadsheet application grid, the data
map is parsed to find XPATHs in the imported spreadsheet document of XML
data and the user entered data. Each XPATH is executed to determine the
location, data types and user data for each cell or list object in the
document that is related back to the associated schema file. The cells
and lists are populated with the XML data and user data, and the data is
rendered in the spreadsheet according to the formatting dictated by the
XML data applied to the spreadsheet in association with the XML schema
file. After an imported document has been edited, or after a document is
created to include the application of XML data in association with a
selected XML schema file, the document may be exported such that the XML
data applied to the document is maintained for subsequent import and use
of the document.