public static WorksheetContext SetBorder(this WorksheetContext instance, SpreadsheetBorder top, SpreadsheetBorder left, SpreadsheetBorder bottom, SpreadsheetBorder right) => instance.WrapOperation(() => { instance.CurrentRange .SetBorderTop(top) .SetBorderBottom(bottom) .SetBorderLeft(left) .SetBorderRight(right); });
public static ExcelBorderItem Apply(this ExcelBorderItem instance, SpreadsheetBorder border) { if (border.Style is not null) { instance.Style = SpreadsheetBorderStyleMapper.Map(border.Style.Value); } if (border.Color is not null) { instance.Color.SetColor(border.Color.Value.ToDotNetColor()); } return(instance); }
public IRangeWrapper SetBorderTop(SpreadsheetBorder border) { _range.Style.Borders.Apply(IndividualBorder.Top, border); return(this); }
public static WorksheetContext SetBorder(this WorksheetContext instance, SpreadsheetBorder top, SpreadsheetBorder leftRight, SpreadsheetBorder bottom) => instance.SetBorder(top, leftRight, bottom, leftRight);
public static WorksheetContext SetBorder(this WorksheetContext instance, SpreadsheetBorder all) => instance.SetBorder(all, all, all, all);
public static WorksheetContext SetBorderRight(this WorksheetContext instance, SpreadsheetBorder border) => instance.WrapOperation(() => { instance.CurrentRange.SetBorderRight(border); });
public IRangeWrapper SetBorderRight(SpreadsheetBorder border) { _range.Style.Border.Right.Apply(border); return(this); }
public IRangeWrapper SetBorderBottom(SpreadsheetBorder border) { _range.Style.Border.Bottom.Apply(border); return(this); }
public IRangeWrapper SetBorderTop(SpreadsheetBorder border) { _range.Style.Border.Top.Apply(border); return(this); }
public static CellBorders Apply(this CellBorders instance, IndividualBorder side, SpreadsheetBorder border) { if (border.Style is not null) { instance[side].LineStyle = SpreadsheetBorderStyleMapper.Map(border.Style.Value); } if (border.Color is not null) { instance[side].LineColor = border.Color.Value.ToDotNetColor(); } return(instance); }