to the following part of your code I added comments :
if (j == 0 || j == 2 || j == 3 || j == 5)
{
currentCell.CellStyle = rightStyle;
if (dt.Rows[i][j].ToString() != "" && dt.Rows[i][j] != null)
{
var cellValue = Convert.ToDouble(dt.Rows[i][j]);
currentCell.SetCellValue(cellValue);
}
else
currentCell.SetCellValue(dt.Rows[i][j].ToString());
if (j == 2 || j == 3)
{
currentCell.CellStyle = amountStyle;
}
if (j == 2 || j == 4)
{
currentCell.CellStyle = dateStyle;
}
}