public static XLStyle RedStyle(C1XLBook book)
        {
            XLStyle s = new XLStyle(book)
            {
                AlignHorz = XLAlignHorzEnum.Center,
                AlignVert = XLAlignVertEnum.Center
            };

            s.SetBorderStyle(XLLineStyleEnum.Thin);
            s.SetBorderColor(Color.Black);
            s.Font      = new Font("Tahoma", Convert.ToSingle(7), FontStyle.Regular);
            s.BackColor = Color.Red;
            //s.Format = "s";
            return(s);
        }
        public static XLStyle TotalStyle(C1XLBook book)
        {
            XLStyle s = new XLStyle(book)
            {
                AlignHorz = XLAlignHorzEnum.Center,
                AlignVert = XLAlignVertEnum.Center
            };

            s.SetBorderStyle(XLLineStyleEnum.Thin);
            s.SetBorderColor(Color.Black);
            s.Font      = new Font("Tahoma", (float)(7), FontStyle.Bold);
            s.BackColor = Color.Yellow;
            //s.Format = "s";
            return(s);
        }
        public static XLStyle FootNameStyle(C1XLBook book)
        {
            if (book == null)
            {
                throw new ArgumentNullException("book", "book is null.");
            }

            XLStyle style = new XLStyle(book)
            {
                AlignHorz = XLAlignHorzEnum.Left,
                AlignVert = XLAlignVertEnum.Center,
                ForeColor = Color.Black,
                Font      = new Font("Arial", (float)7)
            };

            style.SetBorderStyle(XLLineStyleEnum.None);
            style.SetBorderColor(Color.Black);

            return(style);
        }
        public static XLStyle MachineHeaderStyle(C1XLBook book, xlsHeaderType headerType)
        {
            if (book == null)
            {
                throw new ArgumentNullException("book", "book is null.");
            }

            XLStyle style = new XLStyle(book);

            switch (headerType)
            {
            case xlsHeaderType.Detail:
                style.BackColor = Color.FromArgb(204, 255, 204);
                break;
            }
            style.AlignHorz = XLAlignHorzEnum.Center;
            style.AlignVert = XLAlignVertEnum.Center;
            style.ForeColor = Color.Black;
            style.Font      = new Font("Tahoma", (float)7, FontStyle.Bold);
            style.SetBorderStyle(XLLineStyleEnum.Thin);
            style.SetBorderColor(Color.Black);
            style.WordWrap = true;
            return(style);
        }