I am trying to build a simulation tool in Excel using VSTO and by creating a Visual Studio 2010 Office workbook project. One of the worksheets in this workbook will contain approximately half a million records. Ideally I would like to read all of the records use them in the simulation and then output back some statistics. So far I had OutOfMemory
exceptions when I tried to get the whole range and then the cells out of it in one go. Does anyone have other ideas as to how I can read all of the data or suggestions in doing this?
This is my code:
Excel.Range range = Globals.shData.Range["A2:AX500000"];
Array values = (Array)range.Cells.Value;