For local python in a spreadsheet, LibrePythonista allows running IPython code in a LibreOffice spreadsheet
https://news.ycombinator.com/item?id=41443012