Plotly table - href to file does not work

I can’t get the link to a file working. Linking to an url is no problem.

(note the double quotes are actually a backslash + quote in the script)

import plotly.graph_objs as go
import plotly.offline as py

trace = go.Table(
header=dict(values=[
‘type’, ‘link’
]),
cells=dict(values=[
[‘url’, ‘path of file’],
[’<a href=“https://plot.ly/”>Plotly’, ‘<a href=“file:///D:/temp-plot.html”>File’]
])
)
layout = dict(autosize=True)
fig = go.Figure(data=[trace], layout=layout)

py.plot(
fig,
image=None,
image_width=800,
image_height=600,
auto_open=True
)

Although file hrefs weer not an issue in other html code (only in Plotly tables), I tried the Chrome ‘enable local file’ and ‘local-explorer’ extensions, but it did not help.

“”"
Chrome extensions which allow enable local file links:

- https://chrome.google.com/webstore/detail/enable-local-file-links/nikfmfgobenbhmocjaaboihbeocackld
- https://chrome.google.com/webstore/detail/local-explorer-file-manag/eokekhgpaakbkfkmjjcbffibkencdfkl/reviews?hl=en

“”"

import plotly.graph_objs as go
import plotly.offline as py

trace = go.Table(
header=dict(values=[
‘type’, ‘link’
]),
cells=dict(values=[
[
‘url’,
‘path to file (enable-local-file extension)’,
‘path of file (local-explorer)’
],
[
‘<a href=“https://plot.ly/”>Plotly’,
‘<a href=“file:///D:/temp-plot.html”>File’,
‘<a href=“localexplorer:D:/temp-plot.html”>File’
]
])
)
layout = dict(autosize=True)
fig = go.Figure(data=[trace], layout=layout)

py.plot(
fig,
image=None,
image_width=800,
image_height=600,
auto_open=True
)