示例#1
0
        public ExcelExporter(bool useBorder, ExcelContentFormat header,
            ExcelContentFormat content, Tk5ListMetaData metaData)
        {
            TkDebug.AssertArgumentNull(header, "header", null);
            TkDebug.AssertArgumentNull(content, "content", null);
            TkDebug.AssertArgumentNull(metaData, "metaData", null);

            fUseBorder = useBorder;
            fHeader = header;
            fContent = content;
            fMetaData = metaData;
        }
示例#2
0
        public ExcelExporter(bool useBorder, ExcelContentFormat header,
                             ExcelContentFormat content, Tk5ListMetaData metaData)
        {
            TkDebug.AssertArgumentNull(header, "header", null);
            TkDebug.AssertArgumentNull(content, "content", null);
            TkDebug.AssertArgumentNull(metaData, "metaData", null);

            fUseBorder = useBorder;
            fHeader    = header;
            fContent   = content;
            fMetaData  = metaData;
        }
示例#3
0
        // 字体设置
        public 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);
        }
 public ExportExcelHeaderPageMaker(ExcelContentFormat header, ExcelContentFormat content)
     : base(header, content)
 {
     UserBorder = false;
 }
 public ExportExcelPageMaker(ExcelContentFormat header, ExcelContentFormat content)
     : base(header, content)
 {
 }
示例#6
0
        // 字体设置
        public 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;
        }