コード例 #1
0
        public Table(decimal width = 1000, int indentation = 0, short marginLeft = 0, short marginRight = 0)
        {
            _Table = new _Table();
            _TableProperties _tp = new _TableProperties();

            _TableWidth _tw = new _TableWidth()
            {
                Width = width.ToString(), Type = _TableWidthUnitValues.Dxa
            };

            _tp.Append(_tw);

            _TableIndentation _ti = new _TableIndentation()
            {
                Width = indentation, Type = _TableWidthUnitValues.Dxa
            };

            _tp.Append(_ti);

            _TableCellMarginDefault _md = new _TableCellMarginDefault();
            _TableCellLeftMargin    _lm = new _TableCellLeftMargin()
            {
                Width = marginLeft, Type = _TableWidthValues.Dxa
            };
            _TableCellRightMargin _rm = new _TableCellRightMargin()
            {
                Width = marginRight, Type = _TableWidthValues.Dxa
            };

            _md.Append(_lm);
            _md.Append(_rm);

            _Table.Append(_tp);
        }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="tableIndentation"></param>
 public TableIndentation(DocumentFormat.OpenXml.Wordprocessing.TableIndentation tableIndentation)
 {
     this.tableIndentation = tableIndentation;
 }