"can someone please tell me how to import data from MySQL database and export in excel sheets. please explain with all the steps and code."
Asked
Active
Viewed 417 times
1 Answers
0
There is no direct way to do this. By having entity, repository in hand you can use Apache Poi library to create a excel structure in service class.
This is a good example: https://www.codejava.net/frameworks/spring-boot/export-data-to-excel-example The trick is mostly in controller and setting Headers.

Mehdi Pourrostam
- 21
- 2
-
this code include spring boot, can we do this without the help of spring boot?? – Arundhati 99 Dec 30 '20 at 03:17