Import MS excel file into a gdb

8156
15
Jump to solution
04-11-2019 09:36 PM
PureunsolOh
New Contributor III

Hi, GeoNet people!

I'm having an issue with building a gdb on ArcGIS v.10. I attached an error message when I tried to import an excel file that contains only three columns with letters and numbers (decimal). I've looked it up how to resolve the problem and eventually delete MS office including AccessDatabase and suit to be paired with ArcGIS. However, I'm still getting the same error message.

Did any recent ArcGIS user had the same trouble as I did, if so how should I resolve this?

thanks

0 Kudos
1 Solution

Accepted Solutions
JayantaPoddar
MVP Esteemed Contributor

Hello,

Ensure there is no spaces in the Header row of excel sheet. In MS Excel, you could use Save As option to save it in 97/2003 format (*.xls). Add the Excel Table to ArcMap. Right-Click the Excel table in Table of Contents (ArcMap), and export it to geodatabase table.

If the issue still persist, you could attached the Excel sheet so that we can check it.



Think Location

View solution in original post

15 Replies
DanPatterson_Retired
MVP Emeritus

Excel To Table—Conversion toolbox | ArcGIS Desktop  for arcmap and Pro, but you need to adhere to some basic rules

Work with Microsoft Excel files in ArcGIS Pro—Excel | ArcGIS Desktop 

Some include

mixed types in columns (don't mix numbers and text in a column) and blank cells are a definite problem area,

If you have to assign nodata values, pick one but don't leave the cells blank.

PureunsolOh
New Contributor III

Hi, Dan.

Thanks for the response. The guide was saying that arcgis support 2003 or earlier MS office and 2007. Apparently I'm using MS office 2016, which I concern if that causes to give this error message on arc catalog.

0 Kudos
DanPatterson_Retired
MVP Emeritus

You indicate an Excel file in your first post, hence my recommendations on how to bring an excel file in and make it a gdb table.  Not sure what your table to table tool image is about at all

PureunsolOh
New Contributor III

I referenced ESRI page to run python. But I got an error message: 

I changed any of files being used that has underscore"_", and still getting the same error message. I can't seem to think what went wrong and how to resolve this issue(importing excel file with lat long into arcmap)

0 Kudos
DanPatterson_Retired
MVP Emeritus

Try raw encoding your path, in Pro, it completely fails.  ArcGIS Pro brings a whole new slate of issues since Python 3.x is used

# ---- Your future if you continue to use space in file paths and filenames

"C:\Users\Long_Path\With spaces\Lat long.xls"
  File "<ipython-input-3-5146bebb7550>", line 1
    "C:\Users\Long_Path\With spaces\Lat long.xls"
                                                 ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

# ---- raw encoding
r"C:\Users\Long_Path\With spaces\Lat long.xls"  # notice the preceding 'r'
'C:\\Users\\Long_Path\\With spaces\\Lat long.xls'
curtvprice
MVP Esteemed Contributor

This the error about not being able to connect to database is is related to this. Though I have never used Office 64 bit so that may add a whole set of problems as ArcMap is a 32 bit app. You probably need to install a 32 bit driver (linked from the help below) to get .xlsx files to read into ArcMap.

http://desktop.arcgis.com/en/arcmap/latest/manage-data/tables/understanding-how-to-use-microsoft-exc...

JayantaPoddar
MVP Esteemed Contributor

Hello,

Ensure there is no spaces in the Header row of excel sheet. In MS Excel, you could use Save As option to save it in 97/2003 format (*.xls). Add the Excel Table to ArcMap. Right-Click the Excel table in Table of Contents (ArcMap), and export it to geodatabase table.

If the issue still persist, you could attached the Excel sheet so that we can check it.



Think Location
PureunsolOh
New Contributor III

Hi,

Thanks for your reply. FYI, I'm using ArcMap 10.6.1 desktop on Windows OS. I've attached my excel file.xls

0 Kudos
DanPatterson_Retired
MVP Emeritus
  • I put the file in c:\temp
  • I removed the space in the filename so it was LatLong.xls
  • I use Excel to table.... it made a table
  • I use XY Table To Point... it made a featureclass... I specified a GCS WGS84 coordinate system since your data are in decimal degrees.
  • It looked weird because record 30 has an error ... lat  4.40966639  perhaps 41.40966639 or some other number in your range
  • I didn't bother to go back and fix it... you will have to fix the error, rename the table, save it in a spaceless folder and rerun the steps