title: NPOI apply font to entire row of cells
body: <p>I'm using NPOI to export my data to excel. The problem is I found it really hard for any kind of graphical changes. </p>
  
  <p>This is the method I'm using now to apply bold font to my cells.</p>
  
  <pre><code>//Create new Excel workbook
          var workbook = new HSSFWorkbook();
  
          //Create new Excel sheet
          var sheet = workbook.CreateSheet();
  
          //Create a header row
          var headerRow = sheet.CreateRow(0);
  
          var boldFont = workbook.CreateFont();
          boldFont.FontHeightInPoints = 11;
          boldFont.FontName = "Calibri";
          boldFont.Boldweight = (short)NPOI.SS.UserModel.FontBoldWeight.Bold;
  
          int cellCounter = 0;
  
          //day
          var cell = headerRow.CreateCell(cellCounter++);
          cell.SetCellValue("Day");
          cell.CellStyle = workbook.CreateCellStyle();
          cell.CellStyle.SetFont(boldFont);
          //month
          cell = headerRow.CreateCell(cellCounter++);
          cell.SetCellValue("Month");
          cell.CellStyle = workbook.CreateCellStyle();
          cell.CellStyle.SetFont(boldFont);
          //year
          cell = headerRow.CreateCell(cellCounter++);
          cell.SetCellValue("Year");
          cell.CellStyle = workbook.CreateCellStyle();
          cell.CellStyle.SetFont(boldFont);
          //machine name
          cell = headerRow.CreateCell(cellCounter++);
          cell.SetCellValue("Machine unique name");
          cell.CellStyle = workbook.CreateCellStyle();
          cell.CellStyle.SetFont(boldFont); //and so on
  </code></pre>
  
  <p>Is there a ,,cleaner" way to do this ? Now i have to manually add font for individual cells. I've tried many ways to do this on the internet and nothing seems to be working. Do you have a tested way to apply style to specific column or row ?</p>
  
  <p>OffTopic: If not can you provide me with some good open source libraries with decent documentation and support that allow excel export (learning new dll is a pain but... :) what can you do)? </p>