Skip to content

Instantly share code, notes, and snippets.

View felaray's full-sized avatar

Felaray felaray

  • Taiwan R.O.C.
  • 06:22 (UTC +08:00)
  • LinkedIn in/felaray
View GitHub Profile
var csv = Util.ToCsvString(data); // Convert the data to CSV format
// Save the CSV data to a file
var filePath = @"C:\dev\file.csv"; // Specify the path and filename for your CSV file
using (var writer = new StreamWriter(filePath, false, Encoding.UTF8))
{
writer.Write(csv);
}
Console.WriteLine("Data exported successfully!");