I have an Excel file with data in column A. I want to loop through each cell and select the row that that i first come across that has a formula.
This is my code:
import openpyxl
wb=openpyxl.load_workbook(path1)
sheet = wb['Sheet1']
names=sheet['A']
for cellObj in names:
val = str(cellObj.value)
if val[0] == "=":
#select the row from column A to Z and make it's values equal to itself (like doing a copy/pasteSpecial values in excel to remove the formula)
I guess i can append the row in an empty list then make it equal to the row again, but how do i even do that?
Thanks!
cell.data_type == "f"