Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
taschini opened this issue Sep 1, 2023 · 1 comment
Open

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

taschini opened this issue Sep 1, 2023 · 1 comment

Comments

@taschini
Copy link
Contributor

taschini commented Sep 1, 2023

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 taschini changed the title The "Export to Excel The "Export to Excel" button uses the wrong file extension Sep 1, 2023
@mariobuikhuizen
Copy link
Contributor

Have you considered making a separate PR that only fixes this issue, like suggested here: #45 (comment)? That could be easily merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants