469,912 Members | 1,848 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,912 developers. It's quick & easy.

how to import Excel file to JTable

Hi,
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.


Thanks,
Vikas Sawant
Mar 17 '09 #1
1 8268
r035198x
13,262 8TB
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.

Similar topics

10 posts views Thread by Niklas | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.