I've just started using NPOI to generate xls file, but when I try the SetCellValue I got nothing writed on the excel. My code is :
CellsCombined = New CellRangeAddress(0, 4, 2, 4)
hoja.AddMergedRegion(CellsCombined)
HSSFRegionUtil.SetBorderBottom(BorderStyle.Thin, CellsCombined, hoja, wb)
HSSFRegionUtil.SetBorderLeft(BorderStyle.Thin, CellsCombined, hoja, wb)
HSSFRegionUtil.SetBorderTop(BorderStyle.Thin, CellsCombined, hoja, wb)
HSSFRegionUtil.SetBorderRight(BorderStyle.Thin, CellsCombined, hoja, wb)
Dim boldFontTitulo As IFont = wb.CreateFont()
boldFontTitulo.Boldweight = FontBoldWeight.Bold
Dim boldTitulo As ICellStyle = wb.CreateCellStyle()
boldTitulo.SetFont(boldFontTitulo)
boldTitulo.Alignment = HorizontalAlignment.Left
newCell = newRow.CreateCell(idxCell)
newCell.SetCellType(CellType.String)
newCell.CellStyle = boldTitulo
newCell.SetCellValue(New HSSFRichTextString("My Text Here"))
First Edit
idxCell = 1 now, because before this cell, I've successfully inserted an image at the first cell
2nd Edit I tried only this without merging but nothing
newRow.CreateCell(idxCell, CellType.String).SetCellValue(New HSSFRichTextString("My text"))