Unable to import csv files to ArcMap, and preview them in ArcCatalog

5649
15
12-21-2015 11:32 PM
Highlighted
New Contributor

I have been trying to import csv files to ArcMap, but it always tells me General function failure! I can't preview them in ArcCatalog either. Neither my original csv files, or those from the training packages. Any advice? I have ArcGIS 10 on my computer.

Tags (1)
Reply
0 Kudos
15 Replies
Highlighted
MVP Frequent Contributor

Have you looked at the contents of the csv's in a text editor like notepad?

Reply
0 Kudos
Highlighted
New Contributor

Yes, and it looks fine (just as it is supposed to look according to the training package). I imagine those from training packages are formed correctly, and I should be able to import/preview those, even if I made a mistake in my own files.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

copy and paste a few rows here.  We will be looking for field names (the first row) being too long, containing spaces etc.  There should be no blank rows and each column should contain the same data type. etc

Reply
0 Kudos
Highlighted
New Contributor
City,latitude,longitude,Country
Tunis,36.811,10.17,Tunisia
Dakar,14.753,-17.475,Senegal
Rabat,34.021,-6.82,Morocco
Cape Town,-34.026,18.465,South Africa
Antananarivo,-18.915,47.534,Madagascar
Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

ok, if you try to import those 5 rows to using the AddXY data tool, does it fail?  It is a comma-separated values file with a , as the separator but it would be nicer if there were spaces after the comma.  Make sure it isn't being interpreted as space or space and comma-delimited because of Cape Town which contains a space.  If you can read those records as Neil suggested, then the problem is further down.  Since you have places north and south of the equator, make sure you add the resultant file to an empty/new dataframe, before defining its coordinate system

Reply
0 Kudos
Highlighted
New Contributor

I tried using the addXY data tool, but I don't even see the the csv file. When I try to Create a feature class From XY Table, it just tells me There was an error trying to process this table. General function failure General function failure [africa_cities.csv. I tried adding it to an empty data frame, still doesn't work.

I must stress again that this is a csv file from the online ESRI training course. I can open it in Notebook and it looks fine, but I can't preview it in ArcCatalog or import it in any way to ArcMap.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

If you go to your table of contents, and right-click on a new dataframe's title, and select Data, addXY data.  It doesn't work?  It is stored on a local drive and not a usb drive or inside a zip file I assume as well.

Reply
0 Kudos
Highlighted
New Contributor

It doesn't even allow me to add it to the Table of contents. Yes it's on a local drive.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

last try... does the file have a *.csv file extension? try renaming it to *.txt or *.csv.  I haven't seen a file that can't be seen unless it doesn't have a file extension or it has the wrong type of extension regardless of file contents.

Reply
0 Kudos