NPOI将列隐藏很简单用this.sheet.setColumnHidden((short)12, true);

将第13列隐藏,注意excel的第一列用0表示

隐藏行:

HSSFRow row = sheet.getRow(8).setZeroHeight(true);

将第7行隐藏就是将他的高度设为0也等同为隐藏

可以自己写一个扩展方法

public static void Hide(this HSSFRow row)

{
            row.ZeroHeight = true;
}

相关文章:

  • 2021-07-24
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
猜你喜欢
  • 2021-10-03
  • 2021-06-27
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案