May 02
To perform an export operation, follow these steps:
-
In the navigation pane, select the table you want to export.
Unfortunately, you can’t export more than one table at once. However, you can export just a portion of a table. One way to do this partial export is to open the table, and then select the rows you want to export. (Once you start the export process, you see an option that lets you export just the selected rows.) You can also create a query that gets just the rows you want. You can export the query results by selecting the query in the navigation pane instead of the underlying table.
-
Click the button that corresponds to the type of file you want to export.
When you choose a format, Access launches the Export wizard (Figure 10-8).

Figure 10-8. The Export wizard varies depending on the export format you’re using. But the first step’s always to pick your file, and then set the export options shown here. Read the rest of this entry »
Popularity: 13% [?]
May 01
Just as you can import information from other files and pop it in your database, you can also take the existing information and ship it out to another format. You’ll most often undertake this step to let some other person or program get their hands on your information without needing to go through Access.
When exporting your data, you can use all the same formats that you can use in an import operation, plus a few more. Here’s a rundown of the most popular choices:
-
Access. Transfers the Access table (or a different type of object) to another Access database file. This feature isn’t as powerful as importing Access objects, because you’re limited to one object at a time. For that reason, people don’t use it as often.
-
Excel. Puts the data into the cells of an Excel worksheet. Perfect if you want to use Excel’s tools to analyze a sales trend or plot a profit chart.
-
Word. Puts the data into a Word document, separating each column with tabs and each line with a hard return. This format leaves a lot to be desired, because it’s difficult to rearrange the data after the fact in Word. (A nicer export feature would put the report data into a Word table, which would make it far easier to work with.)
-
PDF or XPS. Creates a print-ready PDF file with the exact formatting and layout you’d see if you sent the table to your printer. Unlike Excel or Word documents, you can’t edit a PDF fileyou’re limited to reviewing the report and printing it out.
Note: The PDF or XPS option appears only if you’ve installed a free add-in for Office. Section 8.2.3 describes how to get it.
-
HTML Document. Creates a web-ready HTML Web page that you can post to a Web site or a company intranet. The HTML format that Access generates looks remarkably like your real, printed report.
-
Text File. Dumps the data into a plain text file, with tabs and spaces used to arrange the data. You lose colors, fonts, borders, and other formatting details. This format isn’t very usefulthink of it as a last resort to transfer data to another program if none of the other export options work.
-
XML File. Saves the data in a text .xml file, without any formatting. This option makes sense if you’re using some sort of automated program that can read the exported XML file and process the data.
Popularity: 13% [?]
Apr 30
Text files are the lowest common denominator for data exchange. If you’re using a program that creates files Access can’t import, then plain text may be your only avenue.
Once again, you start by choosing your file, and then choosing how you want to add the information to your database. Then, the Import wizard takes you through a few more steps:
-
Specify the type of text file.
Access can import from two types of text files:
-
Delimited text files use some sort of separator to indicate where each field ends. For example, Joe, Piscapone, 43 is a line of text you may find in a delimited text fileit’s three field values separated by commas.
-
Fixed-width text files separates a record into separate fields by position. Each field has a certain number of characters allocated to it, and if you don’t use them all up, then Access fills the remaining space (up until the next field) with space characters.
Read the rest of this entry »
Popularity: 14% [?]
Apr 29
In order to import from an Excel file, your data should be organized in a basic table. Ideally, you have column headings that match the fields in your database. You should trim out any data that you don’t want to import (like other cells under the table that aren’t a part of the table). You should also remove values calculated using Excel formulas. (As you learned in Section 2.5.5, you shouldn’t store calculated values in a table, because they introduce the risk of inconsistent data.)
Note: Earlier in this chapter, you learned how to take Excel data, and cut and paste your way to an Access table. However, when you perform a full-fledged import, you get the opportunity to change field names, fine-tune data types, and use indexing.
Once you have a cleaned-up table of data in an Excel file, you’re ready to start the import process:
-
Choose External Data
Import
Excel, choose your Excel file, and then specify how you want to add the imported information to your database. Then, click OK.
You learned how to make these decisions in steps 1 to 3 in Section 10.3.2.
-
Choose the worksheet that houses your data (Figure 10-5).
Excel files, or workbooks, begin with three worksheets. Most people plop their data on the first one, which is initially named Sheet1. If you’re an Excel expert, then you might have designated a section of a more complex worksheet as a named range. If so, you can pick that named range from the list.
-
Click Next.
-
If your Excel data has a row with column headings, then choose First Row Contains Column Headings.
These headings become the starting point for your field names. If you don’t choose First Row Contains Column Headings, then Excel treats the first row as an ordinary record.
-
Click Next. Read the rest of this entry »
Popularity: 14% [?]
Apr 28
No matter what type of data you want to import, you’ll go through the same basic steps. Here’s an overview:
-
In the ribbon’s External Data
Import section, click the button that corre-sponds to the type of file you want to import.
When you choose a format, Access launches the Import wizard (Figure 10-4).
-
Enter the name of the file you want to import.
If you don’t remember the file path (or you just don’t want to type it in by hand), then click Browse, and then navigate to the right place in the File Open window. Once you find the file, double-click it.
-
Choose where to place the imported content in your database.
You have three possible choices for placing your data. Depending on the file format you’re using, all these may not be available.
-
Create a new table. This option creates a fresh new table for the data you’re importing, which saves you the headache of worrying about conflicting records. However, if a table of the same name already exists in the Access database, then this option wipes it out. Read the rest of this entry »
Popularity: 13% [?]
Apr 27
Most of the time, you’ll import data that’s in one of these five common formats:
-
Access. When you use this option, you aren’t performing a conversion. Instead, you’re taking a database object from another Access database file, and copying it into the current database.
-
Excel. Pulls the data from an Excel spreadsheet.
-
SharePoint List. Pulls the data from a list that’s hosted on a SharePoint server (which big companies use to help workers collaborate). You don’t need to import SharePoint information in order to work with it. You can also edit SharePoint lists directly in Access. Access 2007: The Missing Manual has much more about getting Access and SharePoint to work together.
-
Text File. Pulls the data out of a plain text file. Typically, plain text files use some sort of character (like a comma) to separate field values. This universally understood format’s supported by many programs, including just about every piece of spreadsheet software ever written. When using this option, Access takes a look at the text file as it tries to figure out how it’s organized. However, you get the chance to confirm or correct the hunch before you import any data, as described in Section 10.3.4.
-
XML File. Pulls the data out of a structured XML file. XML is a cross-platform format used to represent any type of information.
Using the More button, you’ll find several other, more exotic import choices:
-
ODBC Database. Grabs information from just about any database product, provided it has an ODBC driver. This option works particularly well if you need to get data out of a high-end server-side database like Oracle, SQL Server, or MySQL.
-
HTML Document. Extracts information from a list or a table in an HTML Web page. Since HTML’s a standard that’s notoriously loose (and at times downright sloppy), you should try to avoid this option. You’re likely to have importing problems.
-
Outlook Folder. Pulls information out of a folder in Outlook or Outlook Express.
-
dBase File, Paradox File, and Lotus 1-2-3 File. Pulls information out of a file cre-ated with one of these Paleolithic programs.
Popularity: 13% [?]
Apr 26
Although the clipboard cut-and-paste approach is neat, it doesn’t always work out. If you need to export data to a file and you don’t have the corresponding program installed on your computer (or you just don’t want to bother running it), then you need a different way to transfer your information. Similarly, if you’re downloading data from the Web or fetching information from a program that doesn’t support Windows cut-and-paste, you need the full-fledged Access import feature.
When Microsoft designed Access 2007, they spent a fair bit of time making the import and export features clearer and more straightforward. Nowadays, you can do all the importing and exporting you want from a single ribbon tab, which is named External Data (Figure 10-3).

Figure 10-3. The External Data tab’s Import section lets you pipe data into Access using a variety of formats. The Export section does the reverseit takes your table, and exports it in a bunch of different flavors.
Note: The Import and Export sections have easy-to-access buttons for the most popular file formats. If you don’t see what you want, then click the More button to see an expanded list of choices.
Whether you’re importing or exporting data, the process is essentially the same. You answer a few questions about what file you want to use and how you want to make the conversion, and then Access does your bidding.
Once you finish performing an import or export operation, Access gives you the option of saving all your steps. If you do, you can reuse them later on. This method’s a great way to save time if you need to perform the same export or import process again (like if you need to import some data every day, or export a summary at the end of every month).
Popularity: 13% [?]
Apr 25
You can copy information from Access into another program easily enough, but you probably don’t expect to be able to do the reverse. After all, a database is a strict, rigorously structured collection of information. If you try to copy a table from a Word processing program, then you’ll lack vital information, like the data types of each column. For that reason, Access doesn’t allow it.
However, Access makes a special exception for everyone’s favorite spreadsheet program, Excel. You can copy a selection of cells in Excel, and then paste them into Access to create a new table. This procedure works because Excel does distinguish between different types of data (although it isn’t nearly as picky as Access). For example, Excel treats numbers, dates, text, and TRUE/FALSE values differently.
Here’s how to use this feature:
-
In Excel, select the cells you want to copy.
If your spreadsheet includes column titles, then include those headers in the selection. Access can use the titles as field names.
Note: It doesn’t matter what version of Excel you havethis trick works with them all.
-
Hit Ctrl+C to copy your selection.
-
Switch to Access.
-
Click anywhere in the navigation pane, and then press Ctrl+V.
Access notices that you’re trying to paste a group of Excel cells, and it tries to transform them into a table. First, it asks if the first row in your selection includes column titles.
-
If you selected the column titles in step 1, then choose Yes. Otherwise, choose No.
If you choose Yes, then Access doesn’t need to create random field namesinstead, it can use your headers.
Access creates a new table to deal with the new data. This table’s named after the Excel sheet. If your sheet’s named Sheet1 (as so many are in Excel), you now have a Sheet1 table.
Once Access finishes the paste, it shows a confirmation message to let you know everything’s finished successfully.
-
Click OK.
Now you can refine your table to make sure the data types and field names are exactly what you want.
Popularity: 13% [?]
Apr 24
Access lets you copy a selection of rows or an entire table to another program, without going through the hassle of the Export wizard. Access copies these rows to the clipboard as an intelligent object that can convert itself into a variety of software-friendly formats. You can paste them as Excel cells, HTML text (the formatting language of the Web), or RichText (a formatting standard created by Microsoft and supported by all major Word processors). Since HTML and RichText are so widely supported, you’ll almost never have a problem copying your rows into another program when you use this technique.
Here’s how to try it out:
-
If you want to copy an entire table, then, in the navigation pane, select the table. If you want to copy only a few rows, then select them in the Datasheet view, as shown in Figure 10-1.
You’re not limited to copying tables. You can also copy a query’s results. Just select the query in the navigation pane. You can’t copy reports or forms, however.
When you copy rows or an entire table, Access takes your column hiding settings (Section 3.1.4) into account. If you’ve hidden a column so it doesn’t appear in the datasheet (by selecting it, and then choosing Home
Records
More
Hide Columns), Access doesn’t copy it to the clipboard. This technique helps you leave out information you don’t want to copy.

Figure 10-1. When selecting rows in the datasheet, click the gray margin just to the left of the first row you want to select. Then, drag down to select as many rows as you want. If you don’t want to take your hand off the mouse, then you can copy these rows by holding down the Ctrl key, and right-clicking one of them. Then, from the pop-up menu, choose Copy.
Read the rest of this entry »
Popularity: 13% [?]
Apr 23
Anyone who’s spent much time using a Windows computer is familiar with the clipboard a behind-the-scenes container that temporarily stores information so you can transfer it from one program to another. Using the clipboard, you can copy a snippet of text in a Word document, and then paste it into a field in an Access table, or vice versa. That much is easy. But you probably don’t realize that you can copy an entire table of information.
Tip: Almost all Windows programs respect the same shortcut keys for the clipboard. Use Ctrl+C to copy information, Ctrl+X to cut it (copy and delete it), and Ctrl+V to paste it.
Before you try this trick out, you need to understand two key facts about the clipboard:
-
The clipboard can store many different types of information. Most of the time, you’re using it to copy plain text. However, depending on the program you’re using, you could also copy shapes, pictures, tables, and more.
-
Some types of information can convert themselves to other types. If you copy a selection of cells in Excel, then you can paste it as a formatted table in a word processing program like Word or WordPerfect. Of, if you copy a diagram in Visio, then you can paste it as a picture in Paint. In both examples, you copy a specialized type of object (Excel cells or a Visio diagram) to the Windows clipboard. However, this object can downgrade itself when it needs to. You can paste a full-fledged copy of the object in the original program without losing anything, or you can paste and convert it to something simpler in a less powerful program.
This flexibility is the secret to transferring data to and from Access. The following sections explain how it works.
Note: The clipboard approach is simpler than the import and export features in Access. As a result, it’s a faster choice (with fewer steps). Of course, it also gives you fewer choices and doesn’t work with all programs.
Popularity: 19% [?]
Recent Comments