Skip to main content
gamedev.net
🔒 Locked

[java] Export to excel

Started by ebosysindia 4 replies 2k views
Original Post
ebosysindia
ebosysindia
I have data in ms-access database.I want to export it to Excel on click of a button which is in front end developed in core java. I am working on frames NOT applet. I developed a macro in access to export data to excel. But i dont know how to run this macro on click of a button in core java application. Is it possible to run ms-access macro on click of a button in core java application? If not possible kindly suggest some other way. Kindly do me a favour in this regard. Thanks in advance. [Edited by - Sneftel on May 13, 2009 8:58:37 AM]
Sneftel
Sneftel
Don't bother. Just export the data as CSV, with SQL and regular old print statements, then read that in with Excel.
Lord_Evil
Lord_Evil
If you want to have some nicely formatted output, you can use html-tables to build the "excel" file thus being able to format cells (color, size, font, etc.).
Then save the file with a .xls extension and start excel with the file as a parameter or double click on the file (windows should recognize the .xls extension as "Excel").

I did that some years ago with quite good results. There's a library that can write true Excel, too. Unfortunately I don't remember the name since I found it to be using way to much memory and thus didn't use it in my project.
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
INsanityDesign
INsanityDesign
A library would be Apache POI (http://poi.apache.org/). I would got with that or try to fire your Makro through the command line by runtime.
-----The next statement is not true!The previous statement is true!
ebosysindia
ebosysindia
Quote:
Original post by INsanityDesign
A library would be Apache POI (http://poi.apache.org/). I would got with that or try to fire your Makro through the command line by runtime.


Hey Friend,

Most of people told me same as you told "Apache POI" is very good for programming related solution, but still i can't got any solution. can you please provide me macro regarding for this one.

Thanks :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.