Hi,
I am trying to apply a border to the bottom edge of a range of cells using the following code:
rBorder = wsPage.Range[iRow, iCol, iRow, maddCol];
rBorder.CellStyle.Borders.LineStyle = ExcelLineStyle.Thin;
rBorder.CellStyle.Borders[ExcelBordersIndex.DiagonalDown].Color = ExcelKnownColors.None;
rBorder.CellStyle.Borders[ExcelBordersIndex.DiagonalUp].Color = ExcelKnownColors.None;
rBorder.CellStyle.Borders[ExcelBordersIndex.EdgeLeft].Color = ExcelKnownColors.None;
rBorder.CellStyle.Borders[ExcelBordersIndex.EdgeRight].Color = ExcelKnownColors.None;
rBorder.CellStyle.Borders[ExcelBordersIndex.EdgeTop].Color = ExcelKnownColors.None;
rBorder.CellStyle.Borders[ExcelBordersIndex.EdgeBottom].Color = ExcelKnownColors.Black;
But I get all borders (top, bottom, left, right, diagonals) appearing, even through I specifically set the color of the other borders to None. Please see the attached Spreadsheet for an example of my output.
Any ideas?
Thanks,
Mark
BorderExample_f5289943.zip