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

preview_player
Показать описание
Advanced Java Tutorial #7 - Working with Excel and Apache POI

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

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

Subscribe now!

Рекомендации по теме
Комментарии
Автор

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.

JotaFOC
Автор

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

delta_yd
Автор

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.

BonzoBanzai
Автор

+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

DennisKriechel
Автор

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

drmarkreuter
Автор

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

decambi
Автор

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

ajaypundir
Автор

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" :/

Juanmiidk
Автор

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?

flaviomosaf
Автор

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

alexmanakas
Автор

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

rovielabutap
Автор

This is great thank for this good effort

khalidben