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:
Oppgave
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.
Løsning
sheet = workbook.active
print(sheet["A1"].value)
print(sheet["A1:C2"])
print(sheet.cell(row=10, column=6).value)
Mark tasks as Completed
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 5
AVAILABLE TO ULTIMATE ONLY