Search code examples
pythonexcelxlrd

How to extract the value of a given cell?


I want to get the value of a given cell, but my code gives me following error:

AttributeError: 'str' object has no attribute 'value'.

How can I modify it to get the value and not the position of the cell?

data = xl_rowcol_to_cell(row+2,col+3)
datavalue = data.value
print datavalue

Solution

  • To access the value for a specific cell you would use:

    value = worksheet.cell(row, column)