A spreadsheet is not only a collection of cells but also a graph of objects which are linked by references of expressions in cells. Once a cell is modified, all the other cells which are dependent on the cell are re-calculated.
Principally, these operations are performed in main memory. A spreadsheet document is inactive when in a file.