예제 #1
0
        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
        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);
        }