Exporting Data from a MainBoss Table

This help file applies to an out-of-date version of MainBoss.
The most recent version of MainBoss is MainBoss 4.2.4.
For the latest version of this help file can be found here.

< Previous section  |  Table of Contents  |  Index  |  Next section >

If MainBoss can export data from a table, the table will have an Export button. If you click this button, MainBoss opens a standard Windows "Save as" window. The "Save as Type" field gives you the choice of how you want to save the data. The following options are available:

Export for Excel (includes schema in other file) (*.xml): If you choose this format, MainBoss creates two output files: one containing XML data and another containing an XML schema describing that data. Both files are in a format especially tailored for use with Microsoft Excel. If you use the "Save as" window to specify a file name like output, the data is written into a file named output.xml and the schema is written into output.xsd. These file names fit the usual conventions for XML data and schema files.

If you wish to copy the data to a different directory, you must copy both files to the same directory.

For more information on examining exported data using Excel, see Viewing Exported Data in Microsoft Excel.

For more about XML data and schema files, see XML.

Export with embedded schema (*.xml): If you choose this format, MainBoss creates a single output file containing both XML data and an XML schema. You can use this file with any software package that accepts embedded schema. If you wish to copy the data to a different directory, you only have to copy the single file.

Export with no embedded schema (*.xml): If you choose this format, MainBoss creates a single output file containing XML data. Before this data can be used, you will also need a file containing an XML schema; this can be created as described in Obtaining an XML Schema from MainBoss.

If you use "Export with no embedded schema (*.xml)", you must edit the second line of the data file so that it refers to your schema file. For example, suppose you output unit data to a file named unit.xml. You will find that the second line of this file contains:

<dsUnit xmlns="http://thinkage.ca/MainBoss/dsUnit.xsd">

If your schema file is named mbunit.xsd in the same directory as unit.xml, you must change the second line of unit.xml into

<dsUnit xsi:schemaLocation="http://thinkage.ca/MainBoss/dsUnit.xsd mbunit.xsd"
        xmlns="http://thinkage.ca/MainBoss/dsUnit.xsd"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

Note that the name of your schema file must be added as part of the xsi:schemaLocation construct.

< Previous section  |  Table of Contents  |  Index  |  Next section >