Folks have liked using ArcExplorer Java Edition for Education (AEJEE), ESRI’s free, downloadable, dual platform (Win/MacOSX), lightweight GIS tool. But one frequent question is “Can I edit the data in AEJEE?” Not really; AEJEE is a tool for displaying and querying data. But if you need to do some “light editing” of attributes to a small shapefile, you can use Excel to do this. There was a previous blog post about using Excel to edit attributes; this one goes farther.
I had two extra files with state data that I wanted to add to the generic state data, and I wanted to get rid of most of the demographic data to reduce distraction. The process is doable if your spreadsheet or database tool can write “.dbf” files (Microsoft Excel 2003 does but 2007 does not). Here are the steps I used on a PC with Excel 2003:
1.Inside my file navigation, I copied the entire state shapefile (all “state.*” files) from the “\data\usa” folder into a “\data\lessons\atest” folder.
2.I opened “states.dbf” inside Excel2003. (This is a little tricky, so follow steps exactly. Notice the states are not in alphabetical order; do not change this yet!)
3.I highlighted the columns I wanted to eliminate.
4.Instead of deleting the columns, I chose “EDIT\Clear”. (This retains the “nature of the file” as having additional fields.)
5.In the first newly empty column, I made a new field “ORIGINAL” and filled it from 1-51, according to the current positions of the rows.
6.I resorted the rows by “State FIPS” to get an alphabetical table. (Notice ORIGINAL is now scrambled.)
7.I added new data into some previously emptied fields. Since my external tables were in the same alpha sequence, I was able to just copy and paste.
8.When all done adding data, I deleted any remaining fields to the right, to eliminate them from the “nature of the file”.
9.I formatted each of the fields (number, with decimal places)
10.I resorted the rows back to their original position, using the “ORIGINAL” field. (This is a crucial step!)
11.I formatted the entire table as “CourierNew, 8pt” font, then formatted all columns’ field width to “Best Fit”
12.I saved the file as “states1.dbf”, and closed Excel.
13.Inside file navigation, I changed the original “states.dbf” to “states0.dbf” and copied the new “states1.dbf” to “states.dbf”.
Again, this process is nice for modest data sets, and is not meant for heavy editing. There are some gotchas with Excel and the .dbf file format, so, again, see the previous blog post noted above. But this can work for any shapefile.
- Charlie Fitzpatrick, ESRI Education Manager
