internal void FromColorScale(X14.ColorScale cs)
        {
            SetAllNull();

            SLConditionalFormattingValueObject2010 cfvo;
            SLColor clr;

            using (var oxr = OpenXmlReader.Create(cs))
            {
                while (oxr.Read())
                {
                    if (oxr.ElementType == typeof(X14.ConditionalFormattingValueObject))
                    {
                        cfvo = new SLConditionalFormattingValueObject2010();
                        cfvo.FromConditionalFormattingValueObject(
                            (X14.ConditionalFormattingValueObject)oxr.LoadCurrentElement());
                        Cfvos.Add(cfvo);
                    }
                    else if (oxr.ElementType == typeof(X14.Color))
                    {
                        clr = new SLColor(new List <Color>(), new List <Color>());
                        clr.FromExcel2010Color((X14.Color)oxr.LoadCurrentElement());
                        Colors.Add(clr);
                    }
                }
            }
        }
        internal X14.ColorScale ToColorScale()
        {
            X14.ColorScale cs = new X14.ColorScale();
            foreach (SLConditionalFormattingValueObject2010 cfvo in this.Cfvos)
            {
                cs.Append(cfvo.ToConditionalFormattingValueObject());
            }
            foreach (SLColor clr in this.Colors)
            {
                cs.Append(clr.ToExcel2010Color());
            }

            return cs;
        }
        internal X14.ColorScale ToColorScale()
        {
            X14.ColorScale cs = new X14.ColorScale();
            foreach (SLConditionalFormattingValueObject2010 cfvo in this.Cfvos)
            {
                cs.Append(cfvo.ToConditionalFormattingValueObject());
            }
            foreach (SLColor clr in this.Colors)
            {
                cs.Append(clr.ToExcel2010Color());
            }

            return(cs);
        }