Work on new table API

This commit is contained in:
Dolan
2019-03-13 02:29:11 +00:00
parent f3ba11b21c
commit 2cb7d44a77
10 changed files with 91 additions and 30 deletions

View File

@ -1,7 +1,7 @@
// http://officeopenxml.com/WPdocument.php
import { XmlComponent } from "file/xml-components";
import { Paragraph } from "../paragraph";
import { Table } from "../table";
import { ITableOptions, Table } from "../table";
import { TableOfContents } from "../table-of-contents";
import { Body } from "./body";
import { SectionPropertiesOptions } from "./body/section-properties";
@ -58,8 +58,8 @@ export class Document extends XmlComponent {
return this;
}
public createTable(rows: number, cols: number): Table {
const table = new Table(rows, cols);
public createTable(options: ITableOptions): Table {
const table = new Table(options);
this.addTable(table);
return table;
}