Home » Apache POI Hiding Rows

Apache POI Hiding Rows

by Online Tutorials Library

Apache POI Hiding Rows

Using Apache POI, it is possible to hide a row. To hide the row, we can call setZeroHeight() method on the instance of row. This method takes argument either true or false. If the value is true, it will hide the row and unhide the row if value is set false.

Lets see an example in which we are creating a row and hiding it by passing True literal.

Apache POI Hiding Rows Example

Output:

If we set setZeroHeight false, it does not hide the row and shows the following output.

Apache POI Hiding Rows

If we set setZeroHeight True, it hides the row and shows the following output.

Apache POI Hiding Rows

See, it hides first rows and sheet starts from second row.

You may also like