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;
}