Example #1
0
 private void FormattingExcelCells(Excel.Range range, StyleDomain styleDomain)
 {
     range.Interior.Color = ColorTranslator.FromHtml(styleDomain.BackgroundColor);
     range.Font.Color     = ColorTranslator.FromHtml(styleDomain.FontColor);
     range.Font.Size      = styleDomain.FontSize;
     if (styleDomain.IsBold)
     {
         range.Font.Bold = true;
     }
 }
Example #2
0
        public static StyleDomain GetStyleBody()
        {
            var style3 = new StyleDomain
            {
                BackgroundColor = "#DDDDDD",
                FontColor       = "#000000",
                FontSize        = 14,
                IsBold          = false
            };

            return(style3);
        }
Example #3
0
        public static StyleDomain GetStyleColumnName()
        {
            var style2 = new StyleDomain
            {
                BackgroundColor = "#CD853F",
                FontColor       = "#CCCC00",
                FontSize        = 18,
                IsBold          = true
            };

            return(style2);
        }
Example #4
0
        public static StyleDomain GetStyleTitle()
        {
            var style1 = new StyleDomain
            {
                BackgroundColor = "#CD853F",
                FontColor       = "#CCCC00",
                FontSize        = 22,
                IsBold          = true,
                Flag            = true
            };

            return(style1);
        }