PageOffice,word經常使用接口對象--Row類

它表明Word中定義的表格行對象,這個對象只能經過Table類對象的openRow(rowIndex)方法獲取,方法中的參數表明行的索引,從「1」開始,即spa

Row row = table.openRow(rowIndex);// Java開發,table爲Table類對象。

Row類對象的屬性

index:返回行的索引值code

Java代碼:對象

Row row = table.openRow(1);
	int rowIndex = row.getIndex();

ASP.NET代碼:索引

Row row = table.OpenRow(1);
	int rowIndex = row.Index;

Row類對象的方法

SetHeight (RowWidth, WdRowHeightRule):設置表格某一行的高度開發

  • RowWidth:必選參數,指定行的高度,以磅爲單位
  • WdRowHeightRule:可選參數,設置指定行的高度的規則,枚舉類型,詳細請參見PageOffice開發幫助

Java代碼:get

row.setHeight(50f);

ASP.NET代碼:table

row.SetHeight(25f, WdRowHeightRule.wdRowHeightAuto);
相關文章
相關標籤/搜索