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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -