Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara 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:

Compito

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.

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?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 5
AVAILABLE TO ULTIMATE ONLY
some-alt