Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Hasan Diwan Newsgroups: comp.lang.java.gui Subject: Re: How to import Excel file into JTable? Date: Thu, 21 Apr 2016 05:57:15 +0000 (UTC) Organization: Jackson St. Capitol Lines: 27 Message-ID: References: <54c26d5a-1c88-4232-ab6a-e516553e0e73@c19g2000prf.googlegroups.com> <08e989a9-1e49-4ad2-9653-5df33c69e3e6@googlegroups.com> NNTP-Posting-Host: EoLvqg+aCNxigqFzucY52g.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=646 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: slrn/1.0.1 (NetBSD) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.gui:5493 On 2016-02-10, 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.