title: How do Cell Borders in NPOI actually work?
body: <p>I'm curently creating some Excel sheets in C# with NPOI. When I set different borders for some cells, I encountered some weird behaviour.
  For example if I want the first cell (0,0) to have a border on the right and the second cell(0,1) a border on the right and the bottom, I write:</p>
  <pre><code>XSSFWorkbook wb = new XSSFWorkbook();
  ISheet sheet = wb.CreateSheet();
  
  IRow row = sheet.CreateRow(0);
  ICell cell = row.CreateCell(0);
  ICellStyle styleRight = wb.CreateCellStyle();
  styleRight.BorderRight = BorderStyle.Medium;
  cell.CellStyle = styleRight;
  
  row = sheet.CreateRow(1);
  cell = row.CreateCell(0);
  ICellStyle styleBottomRight = wb.CreateCellStyle();
  styleBottomRight.BorderRight = BorderStyle.Medium;
  styleBottomRight.BorderBottom = BorderStyle.Medium;
  cell.CellStyle = styleBottomRight;
  </code></pre>
  <p>this messes up my result and gives my first cell(0,0) a bottom border too.</p>
  <p>However if I switch the order of borders for the second cell-style:</p>
  <pre><code>row = sheet.CreateRow(1);
  cell = row.CreateCell(0);
  ICellStyle styleBottomRight = wb.CreateCellStyle();
  styleBottomRight.BorderBottom = BorderStyle.Medium;
  styleBottomRight.BorderRight = BorderStyle.Medium;
  cell.CellStyle = styleBottomRight;
  </code></pre>
  <p>I get my intended result with a singled border on my first cell and two borders on the second cell.</p>
  <p>Why does that happen? Why does the order of the two commands change the outcome? Why does the <code>styleBottomRight</code>influence how the first cell is styled?
  I'm using NPOI v2.5.1 in .Net Core 3.1</p>