ipyaggrid
ipyaggrid copied to clipboard
The "Export to Excel" button uses the wrong file extension
The "Export to Excel" button uses the extension xls
instead of xlsx
.
Given this minimal example:
import pandas as pd
import requests
from ipyaggrid import Grid
url = 'https://raw.githubusercontent.com/widgetti/ipyaggrid/master/data/meteorites.json'
meteorites = pd.DataFrame(requests.get(url).json()).set_index("id")
g = Grid(
grid_data=meteorites,
export_excel=True,
grid_options= {
'columnDefs' : [{'field': c} for c in meteorites.columns],
}
)
display(g)
Clicking on the "Export to Excel" button triggers the download of a file called my_file.xls
, which makes Excel complain about the extension: