I was attempting to save a Shapefile point file as a CSV. My Shapefile only has one attribute (id). I use the Save Vector Layer as...
tool by right clicking on the shapefile I want to convert.
I have chosen Comma Separated Value (CSV)
from the Format
I select the folder and file name I want to save the file as.
I left encoding to UTF-8
I have selected the id
field I want to export from the shapefile
I set GEOMETRY to AS_YX
I set LINEFORMAT to CRLF
I set SEPARATOR to COMMA
I leave WRITE_BOM as NO
*btw, what is this?
I then save the file. Another program I was using to read that file kept giving me grief until I opened the file in Excel and then saved it again. It was driving my nuts. I happen to open the file in Wordpad just to see the raw data once and noticed the header line.
The file had the following data in it:
Y,X,id,
46.5139490255807,-110.990074324009,1
46.4904918688525,-110.989960260943,1
46.4904314614628,-110.992750419033,2
46.5127715775017,-110.992811837607,2
46.4904405225755,-110.999357302811,3
46.5084993401582,-110.999515236288,3
46.5005246052244,-111.002094816409,4
46.4976285297097,-111.002077268245,4
46.496432607856,-111.002182557229,5
46.4907244366764,-111.002112364573,5
46.4899965262764,-111.002950289408,6
46.4899361183366,-111.009640526966,6
Notice the header line. It has an extra comma on the end of the line. Is this a bug or do I not have a setting set right? I'm running v 2.18.12.