Making only the Header row (row1) Bold in Excel [C#]
Given an Excel File [Tasks.xls] that I create (as a kind of template) which has a Header row [row1, the first row in the Excel File]
So obviously I want to make that rows font BOLD, problem is when I use my current code (as shown below) it seems to make the entire range BOLD so the actual rows of information I add afterwards [row2+] are all BOLD also - not just the header row as I wanted.
oSheet.get_Range("A1", "G1").Font.Bold = true;
Is there a way maybe to set the Font cell by cell? [very easy to just manually set cells [1, 1-6] bold, I just don't want every subsequent row to also be bold.
Is there a way to set it only for row1? (cell by cell basis? row by row basis? of setting Font.Bold = true?)
With excelWorksheet .Cells(row, 1).Value = "Add Something Here" .Cells(row, 1).HorizontalAlignment = Excel.XlHAlign.xlHAlignLeft .Range(row & "1:L1").Font.Bold = True'you can write a function here to convert a numeric column number to a letter EndWith