ipyaggrid icon indicating copy to clipboard operation
ipyaggrid copied to clipboard

The "Export to Excel" button uses the wrong file extension

Open taschini opened this issue 1 year ago • 1 comments

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:

image

taschini avatar Sep 01 '23 15:09 taschini