Operating excel table with Java

Recently, the teacher assigned a task to simply add, delete, change and check the excel file with the suffix xlsx in Java; Although it is a simple program, I still have some bumps as a new contact. But the good thing is that it's finished. Let's make a simple summary.

First, I imported a poi There are many resources available on the jar web to download

XSSFSheet sheet=null; XSSFWorkbook book=null;

1: Query (find the excel table in the specified local location and output it on the console)

2: Change (modify the content of a cell in Excel)

3: Add (insert a row in Excel table to the specified position)

4: Delete (delete the contents of the specified line)

5: Judge the return type (because the contents in Excel are different, including character type, integer type, etc., the type must be judged before output)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>