The following style
var style1 = (XSSFCellStyle)workbook.CreateCellStyle();
var pink = new XSSFColor(new byte[] { 228, 52, 145 });
style1.SetBorderColor(BorderSide.TOP, pink);
style1.BorderTop = BorderStyle.Medium;
Renders correctly in Excel
But not in macOS / iOS Preview
How could I make the borders appear correctly?
Finally, applying borders everywhere fixed the issue in macOS / iOS Preview. I added:
var grayColor = new XSSFColor(new byte[] { 210, 210, 223 });
style1.SetBorderColor(BorderSide.RIGHT, grayColor);
style1.BorderRight = BorderStyle.Thin;
style1.SetBorderColor(BorderSide.LEFT, grayColor);
style1.BorderLeft = BorderStyle.Thin;
style1.SetBorderColor(BorderSide.BOTTOM, grayColor);
style1.BorderBottom = BorderStyle.Thin;