By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,047 Members | 477 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,047 IT Pros & Developers. It's quick & easy.

how to import Excel file to JTable

P: 27
I want to import Excel file data in JTable.For that I am using following Code,

Expand|Select|Wrap|Line Numbers
  1. String excelFileName = "Team1.xls";
  2.  File file = new File(excelFileName );   //‘file’ is the file you want to load.
  3.  JProgressBar progressBar = new JProgressBar(); 
  4.  JTableReadTableModelTask task = new JTableReadTableModelTask(file, null, progressBar, model);
  5.  task.execute();
There is error like can not find Class JTableReadTableModelTask.

I am confused about how to import this class.I can't get this package.

How to solve this error?

Is there any other way to get this output?

This is the big problem for my project.Please help me to solve.

Vikas Sawant
Mar 17 '09 #1
Share this Question
Share on Google+
1 Reply

P: 13,262
That class is not part of the standard Java packages. You need to google for the jar file that contains it and add it to your program's classpath.
Mar 17 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.