Cell Values
Now that we have imported our Excel file in our environment, let's print out some cells values. We work with sample_data.xlsx file. Here is the file content:
Compito
Swipe to start coding
- Select the current
active
sheet; - Print the value of the
"A1"
cell (using the.value
attribute); - Select the cell corresponing to the 6-th row and to the 10-th column.
Soluzione
sheet = workbook.active
print(sheet["A1"].value)
print(sheet["A1:C2"])
print(sheet.cell(row=10, column=6).value)
Mark tasks as Completed
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 5
AVAILABLE TO ULTIMATE ONLY