public ExportExcelPageMaker(ExcelContentFormat header, ExcelContentFormat content)
        {
            TkDebug.AssertArgumentNull(header, "header", null);
            TkDebug.AssertArgumentNull(content, "content", null);

            Header = header;
            Content = content;
        }
示例#2
0
        public ExportExcelPageMaker(ExcelContentFormat header, ExcelContentFormat content)
        {
            TkDebug.AssertArgumentNull(header, "header", null);
            TkDebug.AssertArgumentNull(content, "content", null);

            Header  = header;
            Content = content;
        }
 public void OnReadObject()
 {
     if (Header == null)
     {
         Header = ExcelContentFormat.DefaultHead;
     }
     if (Content == null)
     {
         Content = ExcelContentFormat.DefaultContent;
     }
 }
示例#4
0
        // 字体设置
        private static IFont FontSetting(IWorkbook workbook, ExcelContentFormat excelFormat)
        {
            IFont fontContent = workbook.CreateFont();

            if (!string.IsNullOrEmpty(excelFormat.FontName))
            {
                fontContent.FontName = excelFormat.FontName;
            }

            if (excelFormat.FontBold)
            {
                fontContent.Boldweight = (short)FontBoldWeight.Bold;
            }

            if (excelFormat.FontSize > 0)
            {
                fontContent.FontHeightInPoints = excelFormat.FontSize;
            }
            return(fontContent);
        }
示例#5
0
        // 字体设置
        private static IFont FontSetting(IWorkbook workbook, ExcelContentFormat excelFormat)
        {
            IFont fontContent = workbook.CreateFont();

            if (!string.IsNullOrEmpty(excelFormat.FontName))
                fontContent.FontName = excelFormat.FontName;

            if (excelFormat.FontBold)
                fontContent.Boldweight = (short)FontBoldWeight.Bold;

            if (excelFormat.FontSize > 0)
                fontContent.FontHeightInPoints = excelFormat.FontSize;
            return fontContent;
        }