I have a bunch of data that I’m pulling into my application which frankly is best represented as an Excel spreadsheet. By this I mean:
- There are a lot of columns which need ‘summing up’
- There is a reasonable amount of data (basically a sheet of numbers)
At the moment this is just raw data in a database, but I also have a spreadsheet which shows this data (along with formulas that I need to replicate in my app).
At the moment I’ve just got a List<of T> of each row, however I believe there might be a better collection for storing data of this type. I basically need to be able to manipulate these numbers easily.
Any suggestions?
One option would be to use a DataTable which also has a builtin aggregation method.
For example(from MSDN):
Another advantage is that it supports LINQ queries with LINQ-To-DataSet.