Modify values for a range of cells

46 views
Skip to first unread message

Crypto Rocket

unread,
Apr 4, 2022, 5:07:12 AM4/4/22
to openpyxl-users

I want to modify the values from E1 to En (where "n" is any number)

Example of what I want to do:

for row in sheet.iter_rows(min_row=1, max_row=103, min_col=1, max_col=33, values_only=True): if row[1]:
  if row[1]: sheet.[En] = "something"

How can I achieve this?

Thanks...


Issue Link: https://foss.heptapod.net/openpyxl/openpyxl/-/issues/1811

Charlie Clark

unread,
Apr 4, 2022, 9:05:10 AM4/4/22
to openpyxl-users
On 4 Apr 2022, at 11:07, Crypto Rocket wrote:

> How can I achieve this?

Provide some sample code that might actually work. The openpyxl documentation covers this in detail.

Charlie

--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Sengelsweg 34
Düsseldorf
D- 40489
Tel: +49-203-3925-0390
Mobile: +49-178-782-6226

Crypto Rocket

unread,
Apr 4, 2022, 10:49:04 AM4/4/22
to openpyxl-users
I just need to get the current cell reference to then apply the ".value" to change it's value

Crypto Rocket

unread,
Apr 6, 2022, 6:30:36 PM4/6/22
to openpyxl-users
Can you at least point to where can I find it in documentation? I didn't found exactly what I want...
Reply all
Reply to author
Forward
0 new messages