Skip to main content

A python Jupyter extensions to make notebooks web api for Excel to call using UDF forumla or Ribbon Callback. Jupyter Excel, Python Excel

Project description

jupyterexcel Package

This is a python package to make Jupyter.ipynb file a web api with json result. You can call Jupyter from Excel Formula or Ribbon CallBack Functions SourceCode in JupyterExcel

Before install, please download JupyterExcelTesting.xlsm to try its formula function and excel ribbon. If you think it works, you can modify the url in the sheet to your jupyter page and save it as "Addin" file.

This Jupyter Excel web api can be connected with Excel addin which call this web api. Excel formula will generate a web api url and through winhttp to get json result. It now works Mac Excel by using VBA-Web.

Installation

pip install jupyterexcel

then run

jupyter serverextension enable --py jupyterexcel

Server setting

Please follow config jupyter server or use command

    jupyter notebook --generate-config 
	    if the file alraady there, please do not override.  Remember the file path

and change following values:

c.NotebookApp.token = 'ABCD'   #now, it has to use token mode. In the url in Excel, if it is not token, it will cause page forward to ask password, the excel will not work
c.NotebookApp.allow_origin = '*'  #allow any origin to access your server.  You can ignore following 3 connections,if you connect only from local computer
c.NotebookApp.allow_remote_access = True  #if you like to set to access from other computer
c.NotebookApp.ip = '0.0.0.0'   #allow all ip address to connect to this instance 
c.NotebookApp.iopub_data_rate_limit = 32000000  #it might be good to change to a high number, if you will pass out large amount of data. (bytes/sec) Maximum rate at which stream output can be sent on iopub before

Example

The following screenshot shows the sample notebook file with a function sum. You can download TestingJupyter.ipynb or create your own. The following is an instance I hosted in google cloud platform, you can open and add a function of yours.
http://www.jupyterexcel.com:8888/Excel/TestingJupyter.ipynb?token=ABCD&functionname=sum&1=11&2=8&3=6
http://www.jupyterexcel.com:8888/notebooks/TestingJupyter.ipynb?token=ABCD please change 34.67.24.96 to your computer name or localhost

NotebookExample

The following screenshot shows how excel Formula works. Jupyter Excel

The following screenshot Shows how Ribbon Call Back function works Jupyter Ribbon CallBack

Future Development Plan

  1. Make Excel client side more easier to use, such as generate Excel formula proxy
  2. Able to support R, Julia ....
  3. It might only support one notebook page

Reference

read some code from appmode

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterexcel-0.0.11.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

jupyterexcel-0.0.11-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file jupyterexcel-0.0.11.tar.gz.

File metadata

  • Download URL: jupyterexcel-0.0.11.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for jupyterexcel-0.0.11.tar.gz
Algorithm Hash digest
SHA256 e929208d16f7ff7b528bfa8128f951ce40bb04c3fa370ef02877b83a911333bb
MD5 46334bbeb30e57883cc243f86106b80e
BLAKE2b-256 6c101df3d229d9610462ae6ad44f2e5c99a098fbb8e3e8780bd9093572dd2e63

See more details on using hashes here.

File details

Details for the file jupyterexcel-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: jupyterexcel-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for jupyterexcel-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 0cecb7a573da8842537487c85904f2d37f01a62a3b14c4bd1791478f57cceb77
MD5 2eb82e5bab479b5705b75f39b9725972
BLAKE2b-256 0ada9b3dd2018a31364e6d3cfd416b6524257efb24377ff2dae78c2d9e4b2da6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page