Unclassified at the front and rear ends springboot In the project , Need to use node.js An extension package for file-saver Conduct excel Data export of , Can it be realized? , How to achieve .
spring The project can only be through pom Add dependency implementation to the file , Can be in html Directly in the document import FileSaver from 'file-saver' Is it realized ？
excel Export data 2 Ways of planting ：
1. The backend implementation , adopt POI Technical realization ;
2. The front-end implementation ;
excel It's all right on the first floor , If it's back-end to out , The bottom is poi, You can be lazy secretly , Use Alibaba's EasyExcel, Throw the collection into a tool class and it's done
There is no problem with the implementation of the front-end and back-end , It doesn't matter if the front and rear ends are not separated . The front end is not recommended to do , If the amount of data is too large, it is easy to blow up the browser