最简单的表格
示例代码
package test.create.c04;
import iofd.layout.OfdDocument;
import iofd.layout.block.Paragraph;
import iofd.layout.block.Table;
import java.util.ArrayList;
import java.util.List;
import test.create.TestDocUtil;
/**
* 最简单的表格
* */
public class C0401SimpleTable {
public static void main(String[] args) throws Throwable {
C0401SimpleTable o = new C0401SimpleTable();
o.done();
}
private void done() throws Throwable {
String clzName = this.getClass().getSimpleName();
System.out.println(clzName + " begin");
OfdDocument doc = new OfdDocument();
String s = "这是一个插入表格的示例。";
Paragraph p = new Paragraph();
p.add(s);
doc.add(p);
List head = new ArrayList<>();
head.add("标题一");
List> data = new ArrayList<>();
List