Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Cell Values | Excel Automation with Python (project)
Excel Automation with Python (project)

book
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

  1. Select the current active sheet;
  2. Print the value of the "A1" cell (using the .value attribute);
  3. 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?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 5
AVAILABLE TO ULTIMATE ONLY
some-alt