** 
* 在指定行前面增加行 

* @param tableIndex 
* word文件中的第N张表(从1开始) 
* @param rowIndex 
* 指定行的序号(从1开始) 
*/ 
public void addTableRow(int tableIndex, int rowIndex) { 
// 所有表格 
Dispatch tables = Dispatch.get(doc, "Tables").toDispatch(); 
// 要填充的表格 
Dispatch table = Dispatch.call(tables, "Item", new Variant(tableIndex)).toDispatch(); 
// 表格的所有行 
Dispatch rows = Dispatch.get(table, "Rows").toDispatch(); 
System.out.println(Dispatch.get(rows, "Count")); 
// 要增加行的行数 
Dispatch row = Dispatch.call(rows, "Item", new Variant(rowIndex)).toDispatch(); 
//Dispatch row = Dispatch.call(rows, "Row", new Variant(rowIndex)).toDispatch(); 
Dispatch.call(rows, "Add", new Variant(row)); 

// 要增加行的行数 
Dispatch row = Dispatch.call(rows, "Item", new Variant(rowIndex)).toDispatch(); 
这一句抛了一个异常: com.jacob.com.ComFailException: Invoke of: Item 
Source: Microsoft Word 
Description: 
有没有猛人指点一二???????????????????????????????????????