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

8163
15
12-21-2015 11:32 PM
NatasaKnap_Gasper
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)
0 Kudos
15 Replies
NeilAyres
MVP Alum

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

0 Kudos
NatasaKnap_Gasper
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.

0 Kudos
DanPatterson_Retired
MVP Emeritus

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

0 Kudos
NatasaKnap_Gasper
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
0 Kudos
DanPatterson_Retired
MVP Emeritus

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

0 Kudos
NatasaKnap_Gasper
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.

0 Kudos
DanPatterson_Retired
MVP Emeritus

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.

0 Kudos
NatasaKnap_Gasper
New Contributor

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

0 Kudos
DanPatterson_Retired
MVP Emeritus

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.

0 Kudos