Open Source Python API for Spreadsheets
Python library to Read & Write Excel 2010 xlsx/xlsm files.
Openpyxl is an open source python API for reading & writing Microsoft Excel 2010 (XLSX/XLSM/XLTX/XLTM) file formats. The API allows the Python developer to read existing Excel files, create a new workbook, use number formats, use formulas, merger & un-merge cells, insert images and fold columns. Furthermore, the API allows you to manipulate your workbook in memory and there in no need to create a file on the file system.
The API is rich with features for manipulating Microsoft Excel file format programmatically. You can add charts, add/load & save comments, work with styles, table and more.
At A Glance
An overview of Openpyxl features.
- Read Excel
- Write Excel
- Save to file
- Load from file
- Add Charts
- Add Tables
- Add/Load Comments
- Validate Cells
- Parse Formulas
- Use Filters
- Conditional Formatting
Openpyxl supports popular Excel spreadsheet file formats listed below.
Openpyxl supports Python 2.7, 3.4, 3.5, 3.6 and 3.7
Getting Started with Openpyxl
The recommended way to install openpyxl is via PIP. Please use the following command to install Openpyxl.
pip install openpyxl
Manipulating Excel Workbooks via Free Python API
Openpyxl API allows reading & writing Microsoft Excel 2010 file formats using Python. The developers can easily open existing workbook using load_workbook() method and create a new workbook using workbook() method. You can use numbers formats, use formulas, merge & unmerged cells. insert images and more.
Add Charts is Excel using Free Python API
The Open Source spreadsheet library Openpyxl allows adding wide range of charts in your excel files programmatically. You can add 2D Area Charts, 3D Area Charts, Vertical/Horizontal & Stacked Bar Charts, 3D Bar Charts, Bubble Charts, Line Charts, 3D Line Charts, Scatter Charts, Pie Charts, Projected Pie Charts, 3D Pie Charts, Doughnut Charts, Radar Charts, Stock Charts, and Surface Charts.
Style Excel Spreadsheets using Python
Openpyxl library allows developers the capability to style Excel Spreadsheets programmatically. Using the API, you can set font, font size, color, underlining, set borders, align cells and more.