How set height row in excel with NPOI?

8.9k Views Asked by At

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?

3

There are 3 best solutions below

0
On

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

0
On

try below approach

var row = sheet.CreateRow(0);
row.Height = 10 ;    
//Or     
sheet.GetRow(1).Height = 10;
0
On

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

row.HeightInPoints = 16.5F;