ikantspelwurdz
Well-known member
- Joined
- Dec 8, 2009
- Messages
- 49
- Programming Experience
- 1-3
Given this code:
I want to set 's' to a CSV that MS Excel will understand. I figure there's got to be an MS library that lets me do this fairly simply, and that already accounts for tricky cases like comma values in the properties of Foo, or anything like that that I didn't think of. I did see some simple looking code examples involving Linq, but they don't account for the possibility of comma in the property values, which is why I'm hoping there's something in the framework (or in an Office library) that does all this for me.
VB.NET:
Public Class Foo
Property thing1 As String
Property thing2 As String
Property thing3 As String
Property thing4 As String
Property thing5 As String
End Class
Sub Main()
Dim s as String = ""
Dim l As List(Of Foo) = GetListOfFoo()
End Sub
I want to set 's' to a CSV that MS Excel will understand. I figure there's got to be an MS library that lets me do this fairly simply, and that already accounts for tricky cases like comma values in the properties of Foo, or anything like that that I didn't think of. I did see some simple looking code examples involving Linq, but they don't account for the possibility of comma in the property values, which is why I'm hoping there's something in the framework (or in an Office library) that does all this for me.