Copy List of Structures to Excel Range
- by KDP
Does anyone know how to copy a VB.Net list of structures to an Excel range? It's not hard to do with an array, but I can't get a list of structures to work.
Example:
Structure MyStruct
Dim MyField1 as String
Dim MyField2 as Integer
End Structure
Dim MyList As New List(Of MyStruct)
...populate list of structures...
Dim rng as Excel.Range = MySheet.Range("A1","B9")
rng.??? = MyList '*** This is where I get stuck. ***