public ExcelCell(object value, ExcelCellAddress address, ExcelCellStyle style) { Guard.ObjectNotNull(() => address); Value = value; Address = address; Style = style; }
private static ExcelCell AdaptCell(ExcelRangeBase cell) { var adr = new models.ExcelCellAddress(cell.Start.Row, cell.End.Column); var rgb = cell.Style.Fill.BackgroundColor.Rgb; var color = Color.Transparent; if (!string.IsNullOrEmpty(rgb)) { var argb = int.Parse(rgb, NumberStyles.HexNumber); color = Color.FromArgb(argb); } var style = new ExcelCellStyle(color); var excelCell = new ExcelCell(cell.Value, adr, style); return(excelCell); }