Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Data to MS Excel and creating .csv file

Status
Not open for further replies.

sujitopics

Programmer
Oct 9, 2001
69
KR
Hi Friends.

I have a AWT Frame which will display the SQL Database Data using JDBC ODBC

Now I want to export that database data to MS Excel

In MS Excel I want to create the .csv file with this SQL Database Data

How to do this
Pl give some references

If possible with some sample code

Thanksinadvance

Yours
Suji
 
1) You could try using the ultra buggy ODBC driver for Excel. Unfortunately it doesn't work very well and you need to have DSN setup.
2) Another option is to buy a package like Formula One. Do a search on Google for it. A word of warning, it is very expensive.
3) The last option is to export to csv and write a small VB(or C++) app to that the csv and import it into Excel. So you will need to wrap this as a JNI call. We actually ended do this for a project because option 1 didn't work since we were allowing uploads of an unknown amount of excel files and the client wouldn't spring for option 2.

This type of conversion is not as straightforward as one would hope. I would be interested in hearing how others have dealt with Excel files in the past, either importing or exporting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top