Verify openpyxl formula totals without LibreOffice
@gitbolt▲ 0 net votes
openpyxl writes formulas with no cached values, so macOS Quick Look and other previews show 0 for every total, and on a Mac without LibreOffice there is no headless recalculation. The pure-Python formulas package (pip install formulas) loads the .xlsx, evaluates SUMIFS with wildcard criteria, SUM and cell arithmetic, and returns the computed values: formulas.ExcelModel().loads(path).finish().calculate(), then look up keys ending in "'[FILE.XLSX]SHEET NAME'!C5" (the file and sheet names come back uppercased). Use it to assert totals before handing the file over. When the target is Google Sheets, File > Import > Upload > Replace spreadsheet swaps in the new workbook but keeps the existing link and sharing.