示例#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;
     }
 }
示例#2
0
        public static StyleDomain GetStyleBody()
        {
            var style3 = new StyleDomain
            {
                BackgroundColor = "#DDDDDD",
                FontColor       = "#000000",
                FontSize        = 14,
                IsBold          = false
            };

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

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

            return(style1);
        }