why can't text editors, notepad or notepad++-or any other editor take a .txt file and convert it into a .csv file?

mikey1871

Distinguished
Nov 13, 2009
60
0
18,640
yes, damn great question seeing as i spent the better part of an hour reading *** replies to the simplistic question... "How do I save a .txt file as a .csv file?" It's not rocket science, but maybe it certainly should be. I can save any and all .csv files as a stupid .txt file, but there isn't a damn program that ever shows up in a fricking google search as to explain how to REALLY save a damn .txt file as a .csv file.

I want a REAL and viable answer to this nagging quandary. I've wasted more than enough time on reading all the bull crap excuses as to why that CAN'T be done. It is the darn 21st century now so let's get more of the idiotic 20th century nagging crap resolved, please!!
Please do NOT try to lie to me and say that "notepad++ does convert them" cause it doesn't. it does know how to change into 54 various "Types" of files. Just NOT into .csv files.
It DOES know what a .csv file is and it can change the .csv files into those 54 other kinds of files. most of which i have no clue what they even do or if they are used much anymore.

SO does anyone know of a real program that can take a.txt file and convert that file into a .csv files?

Also, why call it "comma separated values" when the information in the files is separated by a "semi-colon"?
Great thanks for anyone who actually knows of a program that can change a .txt into a .csv file. You would be in limited company seeing as the vast majority of hits i can find on google are just complaints as to why no one can do this.
 
ummm......Create the text file
Save
Change the extension to .csv as you save
It opens in Excel natively.

The trick is, the file has to be created properly. Commas, semicolons, or whatever, in between the values.

This Notepad txt file, saved as foo.csv:
vKd1DNJ.png


Opens natively in Excel as:
chB4RnB.jpg

 
maybe open the text file in notepad, then use find and replace
just replace(replace all) a SPACE char with a Comma char
and save the result as myfile.csv

guess you would want to would want to check for the common problems like hidden whitespace characters.
(hidden characters like TAB, and control characters)
 
maybe i'm not explaining my quandry correctly.
ok so what the current problem is i'm working on a mod for a game called Darkest hour. in the mod i have to make new names for the additional sea provinces for the mod. In the games "Config" file there is the "province_names.csv" file. I open up that file using notepad++ and i make the necessary name changes on the corresponding "Prov" lines.
here is an example of the new code:
PROV7475;South Iberian Abyssal Plain;South Iberian Abyssal Plain;South Iberian Abyssal Plain;South Iberian Abyssal Plain;South Iberian Abyssal Plain;South Iberian Abyssal Plain;South Iberian Abyssal Plain;South Iberian Abyssal Plain;;;X

That line was originally like this: PROV7475;;;;;;;;;;;X so i just insert the following text, South Iberian Abyssal Plain, in between the semi-colons. That line gets inputted 8 times in the "PROV7475;;;;;;;;;;;X" statement.
Then i save and that new info is saved in the file as a .csv file. i run the mod and that new line shows up when i pass my mouse over that province.

But when i go to upload the new lines of code i have to change the .csv file to a .txt file so the Paradox forum will allow the file to be uploaded.

My problem with my version of the latest notepad++ is that whenever someone else on the mod team does some work updating the sea provinces, they have to upload the file as a .txt file and my notepad doesn't know how to change the .txt file into a .csv file
when i open up the new .txt file in notepad++ and i go up to the left corner to "file" and i click on the "save as" function i get the save as window which does have the correct file name, province_names, and it has the "save as type:" option at the bottom of the save as window. But when i open that window up with the downward pointing arrow i get to choose from 54 different types of file types, (.something).... the rotten thing is that out of those 54 different types of files i can save the file as ",csv" is not one of them that i can choose from.

Does that make more sense? that is my particular dilemma 🙁

Sorry if i wasn't clear about the exact problem.
 
But when i open that window up with the downward pointing arrow i get to choose from 54 different types of file types, (.something).... the rotten thing is that out of those 54 different types of files i can save the file as ",csv" is not one of them that i can choose from.

In the Save dialog, Save as Type
Choose All Files
Simply change the extension, and call it foo.csv.

So csv isn't one of the default types. So what. A properly constructed file (comma, semi-colon, whatever)....save as foo.csv...will be read by something else that recognizes a .csv file
If it is NOT properly constructed, then all bets are off.
 
ok now i'm really confused... i took the text doc and did as you suggested USAFRet totally but it actually worked once. it turned the .txt file into a .csv file. The game read the file as a .csv file and the file has .csv as its extension in the game.

Here is the rub though.... i COULD ONLY GET NOTEPAD++ to do that once. i've tried to repeat the process for the intended result 3 times now and each of the 3 times i can't get the game to recognize the file as anything except as a .txt file. Which the game wont accept for that file.

Does that make any sense to you USAFRet?
 
yeah i was thinking that the data was the same. i'm still unsure how to change the extension after i save the file.

And where do i find the "hide Extensions" thing so i can just manually change the extension to .csv?

Thanks btw for your help today.
 


Assuming Windows...File Explorer.
Right click on the file, Rename.
 
do u mean looking in where the game files are located on my computer? as far as where to find and make sure the "hide extensions" is turned off?

sorry, i had shoulder surgery last week and sometimes the pain meds make me a little loopy and it's hard for me to concentrate on things.
 


In Windows 7, File Explorer (as you are looking at a particular Folder)

Click on Organize, select Menu Bar
Select Tools, Folder Options
Select View
Deselect 'Hide extensions for known file types'
Click OK