This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes using JFileChooser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "using JFileChooser " Watch "using JFileChooser " New topic
Author

using JFileChooser

sunil oza
Greenhorn

Joined: Jun 16, 2009
Posts: 13
Hi,

In my application i want to use a JFileChooser to select the file from a particular location. the file can be either a .xls or .csv file.
How can i display the selected file path in a textfield.
Also help me how can i read the excel or csv file and insert the data into the database table.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

Sunil,
Did you go through this tutorial on using file choosers?
What have you got so far, and where are you stuck?

Also help me how can i read the excel or csv file and insert the data into the database table.

Again,
What have you got so far, and where are you stuck?
http://faq.javaranch.com/java/UseOneThreadPerQuestion I suggest you start a different thread for this question.
Check out the various options available on reading different file types.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
Don't get me started about those stupid light bulbs.
 
subject: using JFileChooser
 
Similar Threads
JFileChooser csv only and default directory
a small GUI question
unix filepath to file class
How can i show backend table data in CSV format
How an XML document is written into CSV format in Java/JSP