January 2019
Intermediate to advanced
390 pages
9h 16m
English
OpenPyXl is a Python library for reading and writing Excel files. It is an open source project. A new workbook is created using the following command:
wb = Workbook()
We can access the currently active sheet by using the following command:
ws = wb.active()
To change the sheet name, use the title command:
ws.title = "Demo Name"
A single row can be added to the sheet using the append method:
ws.append()
A new sheet can be created using the create_sheet() method. An individual cell in the active sheet can be created using the column and row values:
# Assigns the cell corresponding to # column A and row 10 a value of 5ws.['A10'] = 5 #orws.cell(column=1, row=10, value=5)
A workbook can be saved using the save method. ...
Read now
Unlock full access