简体   繁体   English

使用Apache POI创建和更改Excel表

[英]Create and Alter Excel tables using Apache POI

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对象以选择表的单元格范围

JExcelAPi may actually be better and more manageable. JExcelAPi实际上可能更好,更易于管理。 I have used both. 我用过这两个。 However, it is incorrect to say that JExcelAPI by Andy Khan is built over POI. 但是,说Andy Khan的JExcelAPI是建立在POI之上是不正确的。 It is a full fledged Java implementation in its own right, where you can take the source code and make changes to it. 它本身就是一个完整的Java实现,您可以在其中获取源代码并对其进行更改。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM