![]() |
|
[Java] How to write data from MySql table to Excel using Java - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Java] How to write data from MySql table to Excel using Java (/showthread.php?tid=5463530) |
How to write data from MySql table to Excel using Java - Ashish Bisht - Nov 14, 2016 Hi, I have built an application using java programming and I want to write MySQL table data to excel sheet by using Apache's POI libraries and MySQL connector in java. I have explored many mobile development blogs for my previous query on Android Programming & get a satisfactory solution. I hope some of the tech experts in this community can help to figure out my issue on java programming. * - FeatureBug - Nov 14, 2016 All you need to do is select the rows you need and produce a comma separated string for each one. Then you can write each line to a file and save it as a CSV that can be opened with Excel. * - GammaG - Nov 14, 2016 Yeah its probably easiest/fastest way to just create a CSV file. Here a little class that may help you. Code import java.io.BufferedWriter;The usage is like this: Code // Write the first text line |