This is a simple tutorial on creating csv files using C# that you will be able to edit and expand on to fit your own needs.
First you’ll need to create a new Visual Studio C# console application, to do so follow these steps:
To create and run a console application
Start Visual Studio.
- On the menu bar, choose File, New, Project.
- Expand Installed, expand Templates, expand Visual C#, and then choose Console Application.
- In the Name box, specify a name for your project, and then choose the OK button.
- If Program.cs isn’t open in the Code Editor, open the shortcut menu for Program.cs in Solution Explorer, and then choose View Code.
Replace the contents of Program.cs with the following code.
Now when you start the program it should create a csv file called MyTest.csv in the location you specified. The contents of the file should be 3 named columns with text in the first 3 rows.
If you would like to know how to create a console application in Visual Studio that won’t open a command window when it runs see this tutorial link.