Using SpreadsheetLight I want to add a border (only) around a cell range. There shouldn't be any borders inside that range.
What I want:
What I get:
Code I used:
var testDoc = new SLDocument();
var testStyle = testDoc.CreateStyle();
testStyle.Border.Outline = true;
testStyle.Border.SetLeftBorder(DocumentFormat.OpenXml.Spreadsheet.BorderStyleValues.Thin, Color.Black);
testStyle.Border.SetRightBorder(DocumentFormat.OpenXml.Spreadsheet.BorderStyleValues.Thin, Color.Black);
testStyle.Border.SetTopBorder(DocumentFormat.OpenXml.Spreadsheet.BorderStyleValues.Thin, Color.Black);
testStyle.Border.SetBottomBorder(DocumentFormat.OpenXml.Spreadsheet.BorderStyleValues.Thin, Color.Black);
testDoc.SetCellStyle("A3", "F5", testStyle);
return testDoc;
What am I doing wrong? I expected the option Border.Outline = true to result in only producing an outline. Setting it to false doesn't change anything in the output. I'm using SpreadsheetLight in the version 3.5.0 (most current version on NuGet).