0
I am trying to create a line in an excel file through the library NPOI. The problem is that I don’t know how to set a line size. Currently, the line is covering the text content.
How can I set the line height (if possible automatic line height)?
private static void CreateHeader(IRow row, List<string> header)
{
HSSFWorkbook wb = new HSSFWorkbook();
ISheet sheet = wb.CreateSheet("Modelo");
ICellStyle style = wb.CreateCellStyle();
IRow row = row.CreateRow(0);
for (int i = 0; i < header.Count; i++)
{
ICell cell = row.CreateCell(i);
cell.SetCellValue(header[i]);
cell.CellStyle = style;
}
}
Have you tried using the
RowHeight
? In the caserow.RowHeight = 50
, for example, it wouldn’t work?– Evert
@Evert kkk, I didn’t think so, but I saw it has the attribute
Height
andHeightInPoint
– Wallace Maxters