public MMRng SetFill(Excel.XlPattern aFillPattern, double aFillAngleDegree, Color aStartColor, Color aEndColor) { Rng.Interior.Pattern = aFillPattern; Excel.LinearGradient localG = Rng.Interior.Gradient; localG.Degree = aFillAngleDegree; localG.ColorStops.Add(0.001).Color = ColorTranslator.ToOle(aStartColor); localG.ColorStops.Add(0.999).Color = ColorTranslator.ToOle(aEndColor); return(this); }
public SelectionPattern(ref ExcelInterop.Interior interior) { try { Pattern = (ExcelInterop.XlPattern)interior.Pattern; PatternColor = interior.PatternColor; PatternColorIndex = interior.PatternColorIndex; PatternThemeColor = interior.PatternThemeColor; PatternTintAndShade = interior.PatternTintAndShade; } catch { } }
public xlsf SetCellBk(Color ColorObj, Excel.XlPattern PatternType = Excel.XlPattern.xlPatternAutomatic) { CurrCell.Interior.Color = ColorTranslator.ToOle(ColorObj); CurrCell.Interior.Pattern = PatternType; return(this); }