使用Apache POI创建和更改Excel表

时间:2021-10-30 20:23:42

Is it possible to create and alter Excel Tables using apache POI?

是否可以使用apache POI创建和更改Excel表?

There is class that represents an Excel table (http://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFTable.html) and there are two methods createTable and getTables (http://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFSheet.html#createTable()) in the API, but the API does not explains how to manipulate the XSSFTable object in order to select the cell range of the table

有一个代表Excel表的类(http://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFTable.html),有两个方法createTable和getTables(http:// poi。 API中的apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFSheet.html#createTable()),但API没有解释如何操作XSSFTable对象以选择表的单元格范围

2 个解决方案

#1


0  

JExcelAPi may actually be better and more manageable. I have used both. However, it is incorrect to say that JExcelAPI by Andy Khan is built over POI. It is a full fledged Java implementation in its own right, where you can take the source code and make changes to it.

JExcelAPi实际上可能更好,更易于管理。我用过这两个。但是,说Andy Khan的JExcelAPI是建立在POI之上是不正确的。它本身就是一个完整的Java实现,您可以在其中获取源代码并对其进行更改。

#2


-1  

There is library, which is built on top of POI - JExcelApi I think you can do one of two:

有一个建立在POI之上的图书馆 - JExcelApi我认为你可以做两个中的一个:

  1. Look, how it's implemented in JExcelApi and do it in the same way

    看,它是如何在JExcelApi中实现的,并以同样的方式完成

  2. Just use JExcelApi

    只需使用JExcelApi

#1


0  

JExcelAPi may actually be better and more manageable. I have used both. However, it is incorrect to say that JExcelAPI by Andy Khan is built over POI. It is a full fledged Java implementation in its own right, where you can take the source code and make changes to it.

JExcelAPi实际上可能更好,更易于管理。我用过这两个。但是,说Andy Khan的JExcelAPI是建立在POI之上是不正确的。它本身就是一个完整的Java实现,您可以在其中获取源代码并对其进行更改。

#2


-1  

There is library, which is built on top of POI - JExcelApi I think you can do one of two:

有一个建立在POI之上的图书馆 - JExcelApi我认为你可以做两个中的一个:

  1. Look, how it's implemented in JExcelApi and do it in the same way

    看,它是如何在JExcelApi中实现的,并以同样的方式完成

  2. Just use JExcelApi

    只需使用JExcelApi