/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
using System; using System.IO; using System.Text; namespace RedHook.Utils { public class CsvWriter { public static void Write(string[][] data, string outputPath) { for (int i = 0; i < data.GetLength(0); i++) { if (data[i] == null) continue; sb.AppendLine(string.Join(",", data[i])); } File.WriteAllText(outputPath, sb.ToString()); } } }