How can I use openpyxl to read an Excel cell value and not the formula computing it? Ask Question

How can I use openpyxl to read an Excel cell value and not the formula computing it? Ask Question

I am using openpyxl to read a cell value (excel addin-webservice updated this column).

I have used data_only = True but it is not showing the current cell value, instead it is the value stored the last time Excel read the sheet.

wbFile = openpyxl.load_workbook(filename = xxxx, data_only=True)
wsFile = wbFile[c_sSheet]

How can I read the actual cell value?

ベストアンサー1

wb = openpyxl.load_workbook(filename, data_only=True)

The data_only flag helps.

おすすめ記事