Read Excel cell value and not the formula computing it -openpyxl

user3411047 picture user3411047 · Feb 14, 2015 · Viewed 79.5k times · Source

I am using openpyxl to read cell value (excel addin-webservice update 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 cell actual value ?

Answer

Marcin Kajzler picture Marcin Kajzler · Feb 25, 2016
wb = openpyxl.load_workbook(filename, data_only=True)

The data_only flag helps.