private void AddCell(DocumentFormat.OpenXml.Wordprocessing.TableRow tr, string text)
 {
     DocumentFormat.OpenXml.Wordprocessing.TableCell tc = new DocumentFormat.OpenXml.Wordprocessing.TableCell(
         new DocumentFormat.OpenXml.Wordprocessing.Paragraph(
             new DocumentFormat.OpenXml.Wordprocessing.Run(
                 new DocumentFormat.OpenXml.Wordprocessing.Text(text))));
     tr.Append(tc);
 }
예제 #2
0
        public TableCell(decimal width = 1500, int span = 1)
        {
            _TableCell = new _TableCell();
            _tcp       = new _TableCellProperties();

            _TableCellWidth _tcw = new _TableCellWidth()
            {
                Width = width.ToString(), Type = _TableWidthUnitValues.Dxa
            };

            _tcp.Append(_tcw);

            _GridSpan gs = new _GridSpan()
            {
                Val = span
            };

            _tcp.Append(gs);

            _TableCell.Append(_tcp);
        }