I have a problem with the instruction InsertRowsBelow.
I'm in an iteration that writes data into the cells of
a row and then insert a new row below. The interest is to keep the
style of my previous line (with its borders, formats,etc ...) but
sometimes I have to put this line in bold and in others not. So
after inserting my line, I change the style of my line inserted in non-bold.
The problem is that when I go to the next iteration, the style of
my bold lines is lost for each insert !
Here is a simple example code:
For i As Integer = 7 To 15
xlSheet.Cell(i, 1).Value = "A"
xlSheet.Cell(i, 2).Value = "B"
xlSheet.Cell(i, 3).Value = "C"
If xlSheetBis.Cell(i, 1).Value = "Bold" Then xlSheet.Row(i).Style.Font.Bold = True
Dim myRows As Excel.IXLRows = xlSheet.Row(iRow).InsertRowsBelow(1)
myRows.Style.Font.Bold = False
Do you have any ideas?