I want to add borders to a range. Based on some VB code here, I tried this:
Range range = locationWorksheet.Cells.CreateRange(7, 0, 93, 6);
range.SetOutlineBorder(BorderType.TopBorder, CellBorderType.Thick, Color.Blue);
range.SetOutlineBorder(BorderType.BottomBorder, CellBorderType.Thick, Color.Blue);
range.SetOutlineBorder(BorderType.LeftBorder, CellBorderType.Thick, Color.Blue);
range.SetOutlineBorder(BorderType.RightBorder, CellBorderType.Thin, Color.Red);
...but it pushes most of the data down the sheet, as can be seen on the first two screen shots.
To see what the sheet looked like prior to adding these borders, see the third and final screen shot.
Actually, I want internal borders, too, not just around the edge, but first things first, I guess.
BTW, it also seemed like a very "expensive" operation - the report took much longer to generate with that borderizing code added.
NOTE: I updated the Stack Overflow version of this question, which is here.
I added a couple of more scream shots there, too.