I have an excel sheet that I want to display in a DataGrid. My issue is that I don't know what kind of data structure to put in the ObservableCollection so that the rows will show properly. I know this sort of thing works with a struct holding the row data, but a struct with 20 some fields seems messy to me.
How can I display the data from an excel sheet in a Windows Community Toolkit DataGrid?
65 views Asked by samgido At
1
If you don't want a class that represents a row, you can put them in a
List
.You can also use a
Dictionary
for this: