Created
June 19, 2023 09:40
-
-
Save ShilGen/2dd911fe1443bcb3d885f1269a089773 to your computer and use it in GitHub Desktop.
C# | Как создать csv файл
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Text; | |
public class Script | |
{ | |
public static object Execute() | |
{ | |
using (var sw = new StreamWriter(@"C:\Users\shilgen\Documents\1.csv", false, Encoding.UTF8)) | |
{ | |
sw.WriteLine("Ячейка1;Ячейка2;Ячейка3"); | |
sw.WriteLine("Ячейка1-1;Ячейка1-2;Ячейка1-3"); | |
sw.WriteLine("Ячейка2-1;Ячейка2-2;Ячейка2-3"); | |
} | |
return 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment