Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. private static void CreateHeader(IRow row, List<string> header)
  2. {
  3.  
  4. HSSFWorkbook wb = new HSSFWorkbook();
  5.  
  6. ISheet sheet = wb.CreateSheet("Modelo");
  7.  
  8. ICellStyle style = wb.CreateCellStyle();
  9.  
  10. IRow row = row.CreateRow(0);
  11.  
  12. for (int i = 0; i < header.Count; i++)
  13. {
  14. ICell cell = row.CreateCell(i);
  15.  
  16. cell.SetCellValue(header[i]);
  17.  
  18. cell.CellStyle = style;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement