securedeveloper / react-data-export

Export dataset in react.
https://securedeveloper.github.io/react-data-export/
MIT License
179 stars 198 forks source link

File exports without xlsx extension #21

Closed abiodunsulaiman694 closed 6 years ago

abiodunsulaiman694 commented 6 years ago

I'm saving a file with multiple datasets as it is in the docs. The data exports but without the xlsx extension, hence reads as invalid. If I rename the file with the xlsx extension, it opens well with excel. I use create-react-app, so I don't have access to the webpack config. Thanks for your help. Expecting.

securedeveloper commented 6 years ago

Hello, Thank you for letting me know about this issue, You can pass name as prop to ExcelFile For example,

<ExcelFile name={"Employees.xlsx"} ... />

In next patch, I will put extension by default so that if there is no extension defined, It will take assign .xlsx automatically.

abiodunsulaiman694 commented 6 years ago

Thanks. Fixed. Appreciate your swift response. Great job. Great package.