Select to view content in your preferred language

How to import TXT file?

10255
19
01-28-2018 11:29 AM
MalgorzataMendela
Occasional Contributor

Hello,

could you please help me to import this TXT file into ArcMap.
My trials are ending with the error message 

I do not knwo what is wrong with this file.

Thank you in advance

0 Kudos
19 Replies
MalgorzataMendela1
Emerging Contributor

Yes, I can see, but my problem still remains unsolved. Could you please help me with my file? 

0 Kudos
DanPatterson_Retired
MVP Emeritus

You are adding it wrong...

go to the File menu, select Add Data, Add XY data  or equivalent for your version of the software.  You are trying to make an event layer, but you have to get the data in first and the approach I suggested is the quickest

0 Kudos
MalgorzataMendela1
Emerging Contributor

I can nopt do this, because as I choose the file, there is nothing on the lists for X and Y Field   

0 Kudos
DanPatterson_Retired
MVP Emeritus

no clue.. either the file doesn't work on your machine, or your machine has issues.

Here is a copy, try it.  If that doesn't work, I am out of ideas, except to suggest trying it on another machine

maybe a new name will do it

0 Kudos
MalgorzataMendela1
Emerging Contributor

Thank you for your suggestions. I will try it on another machine. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

Just on the off chance... you didn't have the file stored on the Desktop did you?  or a USB drive? 

I have seen situations where files not stored in a real folder cause issues

0 Kudos
curtvprice
MVP Alum

What Dan is getting at is that  paths containing spaces do not work in ArcGIS (esp older versions).  In Windows XP all user data (Desktop, My Documents, etc) folders are in C:\Documents and Settings which would often break ArcGIS!

For this reason Dan and I (and others) strongly encourage users to put their data somewhere else, for example C:\gisclass\mydata, not on the Desktop or in the user documents folder. 

shan_sarkar
Frequent Contributor

Malgorzata,

If the above mentioned does not work for you, can you try bring the data in excel and then see if it works?

My doubt is that ArcGIS desktop is not able to consider the Latitude (Y) and Longitude (X) fields as a double type. Ideally, ArcGIS desktop reads the first 8 rows of the table and assigns/decides the field types.

You may simply copy the data from the text file and paste it in MS Excel and use the Text to Column option to create a properly formatted excel and use that to plot the point data.

I hope this helps!

~Shan


~Shan
0 Kudos
DanPatterson_Retired
MVP Emeritus

Shantonu, the file attachments that I posted were brought into excel for a check. It was fine.  I managed to make the csv from it and brought it in to arcmap and pro as an event layer then I ultimately saved it as a shapefile. So it isn't the data, it is his machine/installation

shan_sarkar
Frequent Contributor

Dan Patterson, that would explain the issue and it does make sense.


~Shan
0 Kudos