How to access the real value of a cell using the openpyxl module for python -
i having real trouble this, since cell.value function returns formula used cell, , need extract result excel provides after operating.
thank you.
ok, think ahve found way around it; apparently access cell.internal value have use iter_rows() in worksheet previously, list of "rawcell".
for row in ws.iter_rows(): cell in row: print cell.internal_value
like charlie clark suggest can set data_only
on true
when load workbook:
from openpyxl import load_workbook wb = load_workbook("file.xlsx", data_only=true) sh = wb["sheet_name"] print(sh["x10"].value)
good luck :)
Comments
Post a Comment