As you might be aware, Microsoft office has started providing a new extension to Microsoft Excel sheets, which is .xlsx
, from Office 2007. With this change, Excel sheets moved to a XML based file format (Office Open XML) with ZIP compression. Microsoft made this change when the business community asked for an open file format that can help transferring data across applications that pushed them. Let's gets started and see how we can work with Excel sheets using Python!
In this recipe, we use the openpyxl
module to read Excel sheets. The openpyxl
module is a comprehensive module that performs both read and write operations on Excel sheets. Another alternative to openpyxl
is the xlrd
module. While xlrd
has been good at supporting Excel formats since way back in 1995, the module can only be used to read data from Excel sheets. The openpyxl
module helps in performing more operations, such as modifying data, writing data into files, and copying, which are imperative...