Setting filter on headers of an Excel sheet via POI

前端 未结 5 796
一个人的身影
一个人的身影 2021-01-30 21:06

I generate a sheet, pretty bog standard headers and columns of data.

I want to turn on the \"Filter\" function for the sheet, so the user can easily sort and filter the

5条回答
  •  梦如初夏
    2021-01-30 21:34

    easiest way of adding filter on header :

    sheet.setAutoFilter(new CellRangeAddress(0, 0, 0, numColumns));
    sheet.createFreezePane(0, 1);
    

提交回复
热议问题