Beispiel #1
0
        public override void AddCell(string data, Style style = null, int horzCellCount = 0, int vertCellCount = 0)
        {
            MergeNextCell(horzCellCount, vertCellCount);

            WriteCellHeader(_CellCount++, _RowCount, false, "str", style);
            _CurrentWorksheetPartWriter.Write("<v>" + _XmlWriterHelper.EscapeValue(data) + "</v>");
            WriteCellFooter();

            if (horzCellCount > 1)
            {
                FillHorzCellCount(horzCellCount);
            }
        }
Beispiel #2
0
        public override void AddCell(string data, Style style = null, int horzCellCount = 0, int vertCellCount = 0)
        {
            string merge       = GetCellMergeString(horzCellCount, vertCellCount);
            string styleString = style != null ? $" ss:StyleID=\"{GetStyleId(style, false)}\"" : "";

            Write(string.Format("<Cell{0}{1}><Data ss:Type=\"String\">{2}</Data></Cell>", styleString, merge, _XmlWriterHelper.EscapeValue(data)));
        }