Skip to main content

Adds Plotly Dash support to PyXLL for integrating Dash apps into Microsoft Excel.

Project description

PyXLL-Dash

Plotly Dash Integration for Microsoft Excel.

See the Plotly Dash Apps In Excel.

Installation

To install this package use:

pip install pyxll-dash

The PyXLL Excel add-in must also be installed. See PyXLL.

Usage

Once installed, the pyxll.plot function can be called with a dash app object.

Calling pyxll.plot with a dash app object from a PyXLL function will display the app in an embedded web control in Excel in the same way as other supported PyXLL plot types.

See PyXLL Plotting for details of how to use the pyxll.plot function.

Example

from pyxll import xl_func, plot
from dash import Dash, html, dcc, callback, Output, Input
import plotly.express as px
import pandas as pd


@xl_func
def dash_app():

    df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminder_unfiltered.csv')

    app = Dash()

    app.layout = [
        html.H1(children='Title of Dash App', style={'textAlign':'center'}),
        dcc.Dropdown(df.country.unique(), 'Canada', id='dropdown-selection'),
        dcc.Graph(id='graph-content')
    ]

    @app.callback(
        Output('graph-content', 'figure'),
        Input('dropdown-selection', 'value')
    )
    def update_graph(value):
        dff = df[df.country==value]
        return px.line(dff, x='year', y='pop')

    # Show the dash app in Excel using PyXLL's plot function.
    # This requires the "pyxll-dash" package to be installed.
    plot(app)

    return app

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

pyxll_dash-0.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyxll_dash-0.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pyxll_dash-0.0.1.tar.gz.

File metadata

  • Download URL: pyxll_dash-0.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxll_dash-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a582dda25759c9bf5cf380a8d809837c7f41e523a8e6ceb3e48735799fbcd735
MD5 1adbe62e6bb8ff909627aea883a7d53b
BLAKE2b-256 1c07ffd89a0a470c1bbed3c242a6b374a664bd3440e99bedb217c761ffcca14a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxll_dash-0.0.1.tar.gz:

Publisher: pypi-upload.yml on pyxll/pyxll-dash

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxll_dash-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyxll_dash-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxll_dash-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f153305544ddb6f690687f7cd9ee87674bef276c3ffa0aef0600f493893b51d
MD5 8877e3e26d18be3d0665442e8a226eac
BLAKE2b-256 ff5d9d37cb66f774e455b2b4da400c35ef67640f792a06a3c52f8c3de08c90a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxll_dash-0.0.1-py3-none-any.whl:

Publisher: pypi-upload.yml on pyxll/pyxll-dash

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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