Functions should not ‘live’ in cells. Function definitions should simply be part of the spreadsheet’s code .
The text-representation of the sheet would include not only a series of cell definitions (coordinates of cells and their contents) but proper functions as well.