4

How set height row in c# with NPOI?

To specify the width of the columns I'm using XSSFSheet.SetColumnWidth, but what does the command for the height of the cells look like?

Garrus_En
  • 161
  • 1
  • 5

3 Answers3

7

try below approach

var row = sheet.CreateRow(0);
row.Height = 10 ;    
//Or     
sheet.GetRow(1).Height = 10;
kumar chandraketu
  • 2,232
  • 2
  • 20
  • 25
2

The height of the row is the same: XSSFSheet.GetRow(index).Heigh {get;set;}

Garrus_En
  • 161
  • 1
  • 5
0

In addition to @kumar answer, you can set it like this

row.HeightInPoints = 16.5F;
zxst
  • 33
  • 3