import excel file in JTable using java

10,698

Here are some use useful links/tutorial for you to use.

Importing Excel (.xls) in Java Swing application

blog

There are a couple of open source libraries which you can use to read an excel file such as Apache POI.

Once you've read your excel file into some data structure, this can be written into a DataModel for a JTable. Alternatively, you could write a custom DataModel which will read dynamically from the excel file, but I'd take the two steps separately and build up the complexity once you understand the excel file reading library you choose.

Share:
10,698
Brainser
Author by

Brainser

Updated on June 15, 2022

Comments

  • Brainser
    Brainser almost 2 years

    I want that when button is clicked using JFileChooser, filedialog need to be opened and when excel file is selected it need to be loaded in JTable can anyone please help how to import excel file into jtable?

  • Brainser
    Brainser almost 11 years
    thank you alpesh..i have already gone through nirav's blog but code that is available is too much confusing...so if you can, then is there any simple method to achieve it..?