Advanced Java Tutorial #7 – Working with Excel and Apache POI

///Advanced Java Tutorial #7 – Working with Excel and Apache POI

Advanced Java Tutorial #7 – Working with Excel and Apache POI

FavoriteLoadingAdd to favorites

Advanced Java Tutorial #7 – Working with Excel and Apache POI

Java468x60

In this tutorial I show you how easy it is to write in and read of excel files with the apache poi library.

You can find the source code on github:

If you have any questions, feel free to write a comment 😉

Subscribe now!

Follow on Twitter:

Like on Facebook:

Visit my Website:

source

By |2020-09-24T09:36:11+00:00September 24th, 2020|Java Video Tutorials|16 Comments

16 Comments

  1. DeltaYD September 24, 2020 at 9:36 am - Reply

    Thank you for this tutorial. It's a very good introduction to this whole thing. Much appreciated

  2. Adarsh Sasidharan September 24, 2020 at 9:36 am - Reply

    Thanks a lot

  3. Mark Reuter September 24, 2020 at 9:36 am - Reply

    Hi Dennis. Will this library read Excel files with Macros (xlsm format)? Cheers!

  4. сирек оқырман September 24, 2020 at 9:36 am - Reply

    Excel is all about shit

  5. Flavio Mosaf September 24, 2020 at 9:36 am - Reply

    hey i woukd like know if you could to show how read one excel file and after this write another excel file usind library poi?

  6. Jaime Ortega September 24, 2020 at 9:36 am - Reply

    The actual Apache-POI has changed a little bit (Yes, I know that this video is a bit old). getCellType is being replaced by getCellTypeEnum, and Cell Types are included in the CellType class and you can compare it by using the equals method.

  7. khalid ben September 24, 2020 at 9:36 am - Reply

    This is great thank for this good effort

  8. Amrutha Jayaram September 24, 2020 at 9:36 am - Reply

    how to read large excel file

  9. Matheus Rocha September 24, 2020 at 9:36 am - Reply

    thanks dude! you saved my life

  10. Alex Manakas September 24, 2020 at 9:36 am - Reply

    Hi
    Is it possible to store the entire row as an array or an object?

  11. Juan Vieira September 24, 2020 at 9:36 am - Reply

    hey there, thanks for the video =)
    i have a question, do you know how to read superscriptfrom an Excel using Apache PIO?
    The excel source have some text cells with superscript and when i read it… the program understand it like plain text, showing a "8^2" like an "82" :/

  12. Decambi September 24, 2020 at 9:36 am - Reply

    Tnx for this great tutorials.. Pls how can i get values from one excel file and append it to another existing excel filebased on some primary key Values. Thank you Once again

  13. BonzoBanzai September 24, 2020 at 9:36 am - Reply

    Good and clear tutorial Dennis.
    Thanks for in the Reading from Excel part that you stated that POI distinguishes between String and Numeric format. I would have incorrectly assumed it would have been String by default, so thanks for pointing it out.

  14. Dennis Kriechel September 24, 2020 at 9:36 am - Reply

    +Rocelle Vie Labutap

    Hey Rovie,

    what kind of file are you trying to open? I've never encountered a problem when opening a java file. Make sure your file has the correct extension (maybe there's a typo).

    If this is not the case, try rightclick the file in eclipse->open with->java editor (I was able to reproduce your error when clicken on in place editor here). If the option Java Editor is missing, you have installed the wrong version of eclipse. Make sure to install the Java or Java EE version.

    If you try to open an excel file, or some other special file type, open it via the system not within eclipse, because ecilpse is not able to show the content of all kind of files.

    If everything fails you could also try to redownload eclipse and create a new workspace as well.

    I hope this will help you.

    Regards,
    Dennis

  15. Rovie Labutap September 24, 2020 at 9:36 am - Reply

    Hi Mr. Kriechel,

    Thank you for this advanced tutorial. So far, the most easy to understand tutorial I can find on Youtube. I can see that you didn't cover the basics, and that's what I'm missing. I'm new in Java, and I can't relate to the problems I encounter. Unfortunately, I can't find a straightforward answer on Google. I encountered problems with regards to OLE Exception. It says,
    "cannot create the in-place editor.
    Reason:
    This is probably because there is no OLE editor registered against the type of file you were trying to open.

    Details:
    Failed to create Ole Client. result = -2147221164."

    I tried this solution:
    1. Open Window -> Preferences -> General -> Editors -> File Associations.
    2. Check if the file type (*.java) is in the list.
    a. If it's in the list, make sure the correct editor is selected as default.
    b. If it's not in the list, add it and associate it with the correct editor.

    — But it didn't work.

    Hope to see your solution regarding this matter as soon as possible. Thank you!

    Regards,
    Rovie

  16. ajay pundir September 24, 2020 at 9:36 am - Reply

    sir i have repeated the same steps that u hd guided in the videos and my codes are running successfully but my excel file is not created can u plz help me in solving it out plzz

Leave A Comment

*