*
The moose likes Beginning Java and the fly likes Hi need help on uploading a file and converting it into CSV then import into JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Hi need help on uploading a file and converting it into CSV then import into JTable" Watch "Hi need help on uploading a file and converting it into CSV then import into JTable" New topic
Author

Hi need help on uploading a file and converting it into CSV then import into JTable

joseph dela cruz
Ranch Hand

Joined: May 17, 2012
Posts: 38

hi ive been thinking if i can make an application that when i download an excel file from the internet or office cloud and upload it in my java application the java app will automatically convert it into CSV file and read it through standard IO library
i know there are third party libraries that read excel files and put it right into JTable

my question is what im trying to do really worth the trouble?
is using a third party library with this kind of function good ? if yes what library you recommend ?
also if there is a more conventional way than these please share it
thanks
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7696
    
  20

joseph dela cruz wrote:my question is what im trying to do really worth the trouble?

Only you can answer that. If you have to do it, you have to.

I guess my question to you is: Do you really need to have the Excel data in your Java app, or do you just need to be able to look at it? If the latter, simplest might be to just plug a launcher into your GUI (ie, an icon for the Excel file that actually launches Excel itself when pressed).

is using a third party library with this kind of function good ? if yes what library you recommend ?

Unless you fancy writing your own Excel parser, you really don't have much choice but to use a 3rd party product; and there are only two basic ones that I know of:
Apache POI and OpenOffice/Lucene.

Of the two, the first is likely to be much quicker to learn, since it's focused directly on Excel; the latter will be a small part of a much larger API. You may be able to do more with OpenOffice though - although there are likely to be restrictions with both of them.

There is also JExcelApi; but I've never used it, so I can't tell you how good it is.

The basic problem you have is that you're dealing with a proprietary format that is closely guarded by Microsoft; and basically, they don't want you looking at their stuff without paying them.

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hi need help on uploading a file and converting it into CSV then import into JTable