ArcGIS 10.1:Importing Excel .xlsx type data of X,Y-coordinates of 65 points to gdb

563
2
01-17-2013 09:49 AM
ScottChang
New Contributor II
Hi all,

I have an Excel .xlsx file that has X,Y-coordinates of 65 points/locations (WGS84):
id           Name              POINT_X                        POINT_Y  
0            DH-1              -77.06710444370            38.86984392600
1            DH-2              -77.06646496950            38.87006592120
.             ....                ....................               ....................
64          DH-65             -77.06323586100            38.86909389460

How can I use a Python-ArcPY script to import these X,Y-coordinates of 65 points/locations (in WGS84) into a File Geodatabase in my ArcGIS 10.1?  Please kindly help and give me the detailed instructions for importing the data to create the Point feature in the .mxd MAP.

Thanks,
Scott Chang
Tags (2)
0 Kudos
2 Replies
JimCousins
MVP Regular Contributor
Scott,
import arcpy
from arcpy import env
## Change this to your workspace location
env.workspace = "C:/JC_Work"

## Change this to your spreadsheet and workbook name
inTable = "C:/JC_Work/TestBook.xlsx/DH_Points$"

## Change this to your File Geodatabase
outLocation = "C:/JC_Work/Test_FGDB.gdb"
outTable = "DH_Points"
arcpy.TableToTable_conversion(inTable,outLocation,outTable)


Then execute MakeXYEventLayer against your new table

Regards,
Jim
0 Kudos
ScottChang
New Contributor II
Hi Jim, Thanks for your valuable response.

I am new in the Python-ArcPy programming. Please specify your C:/JC_Work for env.workspace for me - should it include the path of data and a file geodatabase created by me?

Thanks,
Scott Chang
0 Kudos