Search code examples
excelcell

cell font style in excel


Through this:

xlWorkSheet.Cells[1, 1].Style.Font.Italic = true;

All fonts become italic. For only a given cell to be italic what can be done?


Solution

  • Try changing the font property rather than the cell style property
    Range("a1").Font.Italic = True or Cells(1, 2).Font.Italic = True