Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 17: Importing and Exporting Data


625


Follow these steps to export data from Access to an XML file:


  1. Open the Chapter17_1.accdb database.

  2. Select the table to be exported.

  3. Under the External Data tab, in the Export section, click the More drop-down button,
    and click XML File.

  4. Browse to and select an XML file to export to, and click OK.


The Export XML dialog box (shown in Figure 17.17) appears.


FIGURE 17.17
The Export XML dialog box

Although beyond the scope of this chapter, the Export XML Wizard includes options for specifying
advanced options for the XML export process. Clicking on the More Options button opens a dialog
box (see Figure 17.18) with several important XML settings.

You use the Date Delimiter field to specify the date delimiter character. The default is a forward slash
(/), but you can change this to any other delimiter, such as a period. European dates are often separated
by periods, as in 22.10.12.

Note
When you import text files with Date-type data, you must have a separator between the month, day, and
year. Access reports an error if the field is specified as a Date/Time type and no delimiter is used. When
you’re exporting date fields, the separator is not needed.

With the Time Delimiter option, you can specify a separator (usually a colon) between the parts of time
values in a text file. To change the separator, simply enter another in the Time Delimiter box.

Select the Four Digit Years check box to specify that the year portion of a date field is formatted with
four digits. By checking this box, you can export dates that include the century (such as in 1981 or
2001). The default is to use four-digit years.

The Leading Zeros in Dates option specifies that date values include leading zeros. This means that
date formats include leading zeros (as in 02/04/03), if needed.
Free download pdf