useImport Excel

Hi there! new to the refine.dev can somebody help me here, general design let's say, how can I do an excel import soemthing like useImport csv ? * If somebody would have done that already? * Should I write a pre / js code first to convert the exce;l into csv (there are sometimes interoperable anyways, I know) and then use useImport ? * Or something else ?
3 Replies
foreign-sapphire
foreign-sapphire2y ago
Hey @akmanocha you can check out the documentation for useImport here https://refine.dev/docs/api-reference/core/hooks/import-export/useImport/ Also UI packages has ImportButton with same functionality (uses useImport under the hood) Here is the one for the Ant Design https://refine.dev/docs/api-reference/antd/components/buttons/import-button/ We also have an example for import that you can check out here https://refine.dev/docs/examples/import-export/ useImport has a prop mapData which allows you to map/transform the imported data to match your API 🚀 Hope this helps 🙏
useImport | refine
useImport hook API references of @pankod/refine-core
Import | refine
is compatible with the useImport hook and is meant to be used as it's upload button.
Import-Export | refine
refine allows you to export and import your data as CSV files. You can quickly do CSV import and export operation with refine by creating model operations on the CSV data.
conventional-tan
conventional-tanOP2y ago
Hi @aliemirs that's helpful But I have gone high level over them. What I wanted to confirm or seek help is before going deep does it support CSV only or Excel too? Which is my main use case
foreign-sapphire
foreign-sapphire2y ago
Parsing is done using papaparse. As far as i know, it does not support excel but not sure 🤔