コード例 #1
0
ファイル: ExcelDataWriter.cs プロジェクト: Morebis-GIT/CI
        private void Write(IEnumerable source, IExcelReportConfiguration config, TypeAccessor.TypeAccessor accessor)
        {
            if (config.Options.IsSetHeaderStyle)
            {
                var headerCells = GetHeaderRange(Worksheet, config, Cursor);
                ExcelStyleApplier.ApplyStyle(config.Options.HeaderStyleName, config.Options.HeaderStyle, headerCells);
            }

            WriteHeader(config);

            WriteRecords(source, config, accessor);
        }
コード例 #2
0
ファイル: ExcelDataWriter.cs プロジェクト: Morebis-GIT/CI
        private void ApplyStyle(IExcelMemberOptions options, bool isHeaderRow, ExcelRange cells)
        {
            string     styleName;
            ExcelStyle style;

            if (isHeaderRow)
            {
                styleName = options.HeaderStyleName;
                style     = options.HeaderStyle;
            }
            else
            {
                styleName = options.StyleName;
                style     = options.Style;
            }

            ExcelStyleApplier.ApplyStyle(styleName, style, cells);
        }