$ 0 0 In NPOI, the hierarchy is row based. You have to go though the IRows to see the lastcellnum of each row.