File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Java  MySQL  MS Excel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java  MySQL  MS Excel" Watch "Java  MySQL  MS Excel" New topic

Java MySQL MS Excel

rama krishnan
Ranch Hand

Joined: Mar 14, 2008
Posts: 68
how to export or transfer the MySQL database value into the MS Excel using the Java Code,
I can export the JTable values into MS Excel but I can't with Database to Excel

Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

Hi there,

Have you looked at the Apache POI libraries?

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15092

See JavaRanch FAQ: Accessing File Formats

To work with MySQL, you need a JDBC driver for MySQL. If you don't know how to use JDBC, see Sun's tutorial.

Your question is quite vague and general. If you explain in more detail with what part you have difficulties, it will be easier to give you a useful answer.
[ October 23, 2008: Message edited by: Jesper Young ]

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Rob Spoor

Joined: Oct 27, 2005
Posts: 20275

You can also use a CSV file instead of a "real" Excel file. CSV is plain text with just special separator characters.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Java MySQL MS Excel
It's not a secret anymore!