This is an example how to use xlsx-import
in React.
It is made with CRA
LIB Version: 2.3.3
npm start
- start dev server
npm run build
- build static artifacts
npm run test
- run all tests
npm run test:cra
- run jest only tests
npm run test:cy
- run cypress only tests
npm run cy:open
- open cypress dashboard (server must be started before this command)
npm run eject
- eject CRA
# install dependencies
npm install
# start dev server
npm start
Browser will be opened automatically. Then click on "Download and parse invoice" button. You will see invoice file imported with xlsx-import library.
- Invoice.xlsx fetched as Blob file
- Blob file transformed into ArrayBuffer and passed to exceljs in order to obtain Workbook class
- Workbook class then passed to Importer class of xlsx-import for mapping. This is workaround and will be fixed in #52
- After mapping invoice data rendered with Invoice component
- Study config:
invoiceConfig.js
- Usage package in
App.js (importInvoice function)
- Study documentation: docs
- Start using
xlsx-import
in your project - Ask a lot, report bugs and request for help: https://github.com/Siemienik/xlsx-import/issues
- Sponsor
xlsx-import
project