Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #5493

Re: How to import Excel file into JTable?

From Hasan Diwan <hasandiwan+usenet@gmail.com>
Newsgroups comp.lang.java.gui
Subject Re: How to import Excel file into JTable?
Date 2016-04-21 05:57 +0000
Organization Jackson St. Capitol
Message-ID <nf9q3q$1drd$1@gioia.aioe.org> (permalink)
References <54c26d5a-1c88-4232-ab6a-e516553e0e73@c19g2000prf.googlegroups.com> <08e989a9-1e49-4ad2-9653-5df33c69e3e6@googlegroups.com>

Show all headers | View raw


On 2016-02-10, bnslh.leila@gmail.com <bnslh.leila@gmail.com> wrote:
> Le samedi 10 mai 2008 01:50:28 UTC+1, zfq...@gmail.com a ?crit?:
>> Here are three way to do this.
>> 
>>    1. Use "JTableReadTableModelTask " to do this. ( recommended )
>>    2. Use "ReadTableModelTask" to do this
>>    3. Use ModelIO to do this.
>> 
>> For details: http://www.zfqjava.com/article/How-to-import-excel-into-JTabel.html
>
> Hi,
> Where can i download the jar contains "JTableReadTableModelTask "? Thank you

JTable jTable = new JTable();
String excelFileName = "excelFileName.xls";
File file = new File(excelFileName );   //‘file’ is the file you want to load.
JProgressBar progressBar = new JProgressBar(); //‘progressBar’ will show how much data it have loaded.
JTableReadTableModelTask task = new JTableReadTableModelTask(file, null, progressBar, jTable);
task.execute();
JTable jTable = new JTable();
String excelFileName = "excelFileName.xls";
File file = new File(excelFileName );   //‘file’ is the file you want to load.
JProgressBar progressBar = new JProgressBar(); //‘progressBar’ will show how much data it have loaded.
JTableReadTableModelTask task = new JTableReadTableModelTask(file, null, progressBar, jTable);
task.execute();

After adding the jar in http://www.zfqjava.com/download/componentpack-3.6-eval.zip to your classpath.

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Find similar


Thread

Re: How to import Excel file into JTable? bnslh.leila@gmail.com - 2016-02-10 10:34 -0800
  Re: How to import Excel file into JTable? Hasan Diwan <hasandiwan+usenet@gmail.com> - 2016-04-21 05:57 +0000

csiph-web