My.Computer.FileSystem.WriteAllText
Public Class Tester
Public Shared Sub Main
Dim headings() As String = {"Alpha", "Beta", "Gamma"}
Dim workText As String = String.Join(",", headings)
workText &= "1.1, 2.3, 4.5" & vbNewLine
Dim filePath As String = My.Computer.FileSystem.CurrentDirectory & "\Test.csv"
My.Computer.FileSystem.WriteAllText(filePath, workText, False)
End Sub
End Class
Related examples in the same category