public OXLColumnRowsWriter(OpenXmlWriter writer, OXLDefaultStyle styles, IList <OXLColumn <T> > columnCollection)
        {
            row  = new Row();
            cell = new Cell {
                CellValue = new CellValue()
            };

            this.writer           = writer;
            this.styles           = styles;
            this.columnCollection = columnCollection;

            InitializeSheet();
        }
Пример #2
0
        private OXLDefaultStyle CreateStylesheet()
        {
            var workbookPart = document.WorkbookPart;

            if (workbookPart.WorkbookStylesPart == null)
            {
                workbookPart.AddNewPart <WorkbookStylesPart>();
            }

            var defaultStyle = new OXLDefaultStyle();

            workbookPart.WorkbookStylesPart.Stylesheet = defaultStyle.Style;
            return(defaultStyle);
        }