Starting With "Hello World"
Here are resources for more information about working with virtual environments, pip and bpython:
Save this, and then go ahead and run it. Okay. If everything went well, you should have a new file called
"hello_world.xlsx". If you go to open that up, you should see hello and world! in A1 and B1. All right!
You’ve just made your first spreadsheet using
openpyxl. If we go back here, we can see that the spreadsheet, or
Workbook, is a class inside
openpyxl, and then within each
Workbook is a number of sheets. Here, by taking the active sheet in the workbook, you’ve just selected whichever sheet is open when you open the workbook normally. Each sheet is then broken up into a number of cells, which here are
"B1", and then these cells are organized into rows and columns, which are represented by letters for columns and numbers for the rows.
Before we finish up in this video, go ahead and download the sample Excel worksheet from the resources (Supporting Material) tab. It contains a number of reviews of watches from Amazon, and you’ll use that to practice the different features of
Become a Member to join the conversation.