|
|
Importing Search Results Into a Spreadsheet or Database
These step-by-step instructions will walk you through the process to pull your search results into a spreadsheet or database program (e.g., Microsoft Excel, Quattro Pro, Access). You may want to print these instructions and use them as a guide. Or, open this page in a new window and use this window to conduct your search.
Step 1: Running Your Search
When you run your search, enter your search as normal with one exception: Under Output Option, select either comma-delimited text or tab-delimited text.
It's important to note that when you run your search, the results can be returned to you in different forms, or "output types." In each search form, one of the last options allows you to select the output type. There are three options:
- Text (the default) shows results on your screen so you can read it or print it out;
- Comma-delimited text allows importing into spreadsheet or database; and
- Tab-delimited text allows importing into spreadsheet or databases.
The comma-delimited and tab-delimited options should work about the same for most computers and software programs.
Once you've entered all your search terms, click on the "Submit Query" button.
Step 2: Saving your search results
Save this search results page as a text (.txt) file.
Now that you have run your search, your results will be returned. Your results may not appear on the screen in a form that you can easily read, but that's okay for now.
Once your results are finished downloading to your computer (the little picture in the corner of your browser will stop moving), save the resulting file as a text file (the file will end in ".txt"). (Do not save this file as an HTML file; you may have to change the default file type setting in order to save this as a text file with the .txt extension.)
Step 3: "Clean" the File for Importing
Using word processing software, open the new text file and delete all text except the column headers and data. Save this file using a new name.
Open a word processing software such as WordPerfect, Word or WordPad. WordPad, which comes with all Windows operating systems, is simple to work with. Under the Start menu, select 'programs', 'Accessories', 'WordPad'
Open the file you have just created that shows your search results. The first line of your search results file should look something like this:
AREA REPORT ( TRI DATA )
search used-
Zip Code : 02134
City : ALL
County : ALL
State : MA
Chemical : ALL
CAS : ALL
Year : 1997
Level of Detail: MEDIUM
Output Type : Comma-delimited
Sort order : No sort
This search was taken from the RTK NET (Right-To-Know Network) copy
of EPA's TRIS database. RTK NET is run by OMB Watch at
1742 Connecticut Ave., NW, Washington DC, 20009 - Phone: 202-234-8494
The search was done on 11/19/1999.
Documentation for the data fields in this report is available.
The rest of this file consists of a line of column headers followed by
the delimited data itself.
facility_id,history_record,state,region,facility_closed,federal_fac_type
"02134GNZYM500SO","N","MA","01","N","C"
Delete all the information about RTK NET and the search used so that the first line starts with the line of column or variable names separated by commas or tabs (tabs between the names will appear as blank space). Do not change any of the formatting in the line with the column names or in the lines containing your data. Scroll to the bottom of the message and delete "* End of Report *" if it exists.
If you selected "comma-delimited text" as the output type for your search, the first two lines of your file should look similar to this:
facility_id,history_record,state,region,facility_closed,federal_fac_type
"02134GNZYM500SO","N","MA","01","N","C"
To preserve the information about your search contained in your search output file for future reference, save this "cleaned" file using a different name by selecting "Save As..." in your browser's menu. Once again, be sure to save this file as a text (.txt) file.
Step 4: Import "Clean" File into Spreadsheet or Database program
Open your spreadsheet or database program.
Using your spreadsheet or database program's "Open" or "Import" command, open the clean text file you created in Step 4. Newer database and spreadsheet programs like Access and Excel will ask you a few questions about the file. In Excel, for example, you must first indicate that you have delimited text (i.e., text separated by commas, tabs, or other marks), then you will be asked to indicate whether the text is separated by tabs, commas or other marks. At this point, you can simply hit the "Finish" key and the program should put your data into the spreadsheet or database.
You should be ready to use your data.
RTK NET is a project of OMB Watch
1742 Connecticut Avenue, N.W., Washington, D.C. 20009
202-234-8494 (phone)
202-234-8584 (fax)
rtkhelp@rtknet.org
|