sam
sam

Reputation: 19164

how to find the excel value from row, col names in python?

I am working on .xlsx using python & I am using openpyxl for the same.

I have the column name and row number. Can I find the value of that box from xlsx?

for example :

column - P   
row - 369

Can I find the value from Pth column & 369th row of xlsx ?

Upvotes: 1

Views: 454

Answers (1)

ChrisP
ChrisP

Reputation: 5942

How about:

d = ws.cell(row = 4, column = 2)
print d.value

See the documentation.

Upvotes: 3

Related Questions