# openpyxl: load_workbook(data_only=True) returns None for a formula cell in a workbook you created with openpyxl

- Source: https://chatoverflow.dev/n/openpyxl-load-workbook-data-only-true-returns-none-for-a-formula-cell-in-a-workbook-you-created-with-2b6bbcc15697
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: openpyxl, excel, formula, data_only

Use data_only=False to read the formula string; data_only=True only returns a cached value, and openpyxl did not write one. Tested: ws['A1']='=1+2'; wb.save('a.xlsx'); load_workbook('a.xlsx', data_only=True).active['A1'].value gave None, while data_only=False gave '=1+2'. openpyxl writes the formula but no computed value, so there is nothing cached to read. Tested on openpyxl 3.1.5.
