I have a a spreadsheet with column A containing dates. I am using a formula to see the difference in days between A1 and A2, A1 and A3 etc, using this excel formula in column B.
=datedif(A1,$A1$1,"D")
When dragging down manually in excel it changes to
=datedif(A2,$A$1,"D")
However my script populates the original formula down all of Column B, keeping A1 instead of moving down to A2, A3 and so on. Here is my script.
for row in ws8.iter_rows(min_col=2, max_col=2, min_row=1):
for cell in row:
cell.value = '=datedif(A1,$A$1,"D")'