An Example of Exporting to Excel 2007

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

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

The previous sections of this manual gave basic details of exporting MainBoss data. This section provides a concrete example, showing how to export unit data to Microsoft Excel 2007.

The first step is to create a file containing the data schema for unit data. You do this with the GenerateImportSchema verb:

mbutility gis /si:unit /out:unitschema.xml +excel

This writes the schema into a file called unitschema.xml.

The next step is to export the data:

mbutility ex /si:unit /out:data.xml /on:mymb

This exports data from a database with the organization name mymb, and writes the data into a file named data.xml.

The next step is to modify the data file's XML code so that it refers to the schema file. Start the Windows wordpad command and read in the data file. The second line will look like this:

<dsUnit xmlns="">

Using Wordpad, edit the line so that it looks like this:

<dsUnit xmlns=""
xsi:schemaLocation=" unitschema.xml">

Note that this line ends with the name of the file containing the schema (followed by the characters ">). Once you've made these changes, save the file.

The data file is now ready to be used by Excel. If you have Microsoft Office 2007, here's what you do:

  1. Start Excel.
  2. Click the "Office" button (in the upper left hand corner of the Excel window).
  3. In the resulting window, click "Excel Options" (at the bottom of the window).
  4. In the resulting window, click "Popular" in the left part of the window, then checkmark "Show Developer Tab in the Ribbon" (if it isn't already checkmarked).
  5. Click OK to close the options window.
  6. In the main Excel window, click "Developer" in the ribbon.
  7. In the XML section of the ribbon, click "Import".
  8. In the resulting window, specify the name of the data file (in our example data.xml).

Excel gives you the option of reading the data file into the current spreadsheet or into a new one.

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