I have .txt
data that is described as Lat Lon Elevation (meters) and when I export to .CSV
in Excel it puts all data into 1 column. So when I import the data into QGIS
it all dumps into 1 column, and I cannot change the X
and Y
value column names when importing as Delimited Text File. Help!
-
QGIS on Mac OSX has some issues with incorrect line endings, so look out for that on this site if you encounter similar problems: gis.stackexchange.com/questions/137260/…AndreJ– AndreJ2016年05月07日 12:22:07 +00:00Commented May 7, 2016 at 12:22
-
What delimiter is used in the text file? Maybe you're choosing the wrong type and as such your data is not recognized as column separated. Posting a data sample can be helpful to answer your question.Techie_Gus– Techie_Gus2016年05月10日 05:57:24 +00:00Commented May 10, 2016 at 5:57
3 Answers 3
QGIS can import the .txt file as is, you don't have to convert it to a .csv and thus possibly corrupt the tabulation.
Ssing the add delimited text layer
layer creation box, you can see that it recognizes .txt as one of the acceptable formats.
enter image description here
Assuming that the LAT-LONG-METER field has a consistent number of characters for each entry, you could use right() and (left) to pull apart the text street into new columns, name those what you pleased, and then import them.
You can also save as ".csv" directly from the notepad. Just open your text file (.txt) with Notepad (or Notepad++ or a similar software) and save the file as ".csv". You don't need to save it from Excel. If you still want to save your txt as csv from Excel, after the creation of the csv open it with a text editor and verify which delimiter Excel has created. In case it is not a comma, when importing into QGIS use the custom delimiter and specify the type.