Best Open-Source Python Libraries for Excel

nb2xls

nb2xls - Jupyter notebooks to Excel Spreadsheets

Convert Jupyter notebooks to Excel Spreadsheets (xlsx), through a new ‘Download As’ option or via nbconvert on the command line.

Respects tables such as Pandas DataFrames. Also exports image data such as matplotlib output.

Markdown is supported where possible (some elements still need work).

Input (code) cells are not included in the spreadsheet.

This allows you to share your results with non-programmers such that they can still easily play with the data.

Screenshot of Jupyter Notebook exported to Excel spreadsheet

Please note this is an ALPHA version. Some notebook features may be lost. Please send example ipynb files to me along with reports of any problems.

Installation

Install via pip (recommended)

pip install nb2xls

Restart Jupyter to pick up the new ‘Excel Spreadsheet (.xlsx)’ option under ‘Download As’ in the File menu.

Usage

In Jupyter Notebook, just select the ‘Excel Spreadsheet (.xlsx)’ option under ‘Download As’ in the File menu.

To run from the command line try:

jupyter nbconvert --to xls Examples/ExcelTest.ipynb

or

jupyter nbconvert --to nb2xls.XLSExporter Examples/ExcelTest.ipynb

This should output ExcelTest.xlsx in the same folder as the ipynb file specified.

STATS ON GITHUB

  • 159
  • 31
  • 1
  • License: MIT
  • Author: Dan Lester
  • Last update: N/A

TRENDS