Пример #1
0
        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 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);
        }