如何在Java中使用Apache Poi取消隐藏Excel中的隐藏行?

我有:

import org.apache.poi.ss.usermodel.Row; if ((currentRow = sheet.getRow(currentDataRow)) == null) { currentRow = sheet.createRow(currentDataRow); // Creates a new row. } // How to un-hide currentRow ? 

currentRow是隐藏的,所以使用这个currentRow对象来取消隐藏这一行?

请帮忙.. !!

看起来像是getRowStyle()。setHidden() :

 currentRow.getRowStyle().setHidden(false); 

有关getRowStyle的更多信息。

我有poi-3.7,这些方法也没有出现。

下载最新的一个poi-3.8-beta4和row.setRowStye()和row.getRowStye()存在

Row.getRowStyle() :返回整行单元格样式。 大多数行不会有这些,所以会返回null。

但是你可以检查这行是否被row.getZeroHeight()隐藏,并使用row.setZeroHeight(false)显示行;