In notepad, convert text to CSV using the Replace command.
You can also try this free online tool to convert text to CSV.
Text File Sample
7369 SMITH CLERK 7902 17/12/1980 800 20
7499 ALLEN SALESMAN 7698 20/02/1981 1600 300 30
7521 WARD SALESMAN 7698 22/02/1981 1250 500 30
Convert to CSV Example
- Open the text file in Notepad or in Notepad++.
- Press ctrl+H to invoke Replace window.
- Then in Find What type single space and in Replace with type a comma.
- Then click on Replace All button to replace all single space with the comma ",".
- Save as CSV file.
This method will work if your text file is containing only one space between each column. If having multiple spaces or having complex data, then it is better to convert using Microsoft Excel.