设置外部相关文件行高

This commit is contained in:
zhaol 2025-05-22 17:18:01 +08:00
parent 672dbc5807
commit 2e2849f91c

View File

@ -603,7 +603,7 @@ public class OutputWordUtil {
TableRow row = table.getRows().get(0);
row.isHeader(true);
row.setHeightType(TableRowHeightType.Exactly);
row.setHeight(25);
table.setPreferredWidth(new PreferredWidth(WidthType.Twip, (short) 8335f));
float[] columnWidths = {10f,17f,13f,17f,13f,13f,13f,25f};
@ -1339,7 +1339,7 @@ public class OutputWordUtil {
table.autoFit(AutoFitBehaviorType.Auto_Fit_To_Window);
TableRow row = table.getRows().get(0);
row.isHeader(true);
row.setHeight(20);
//row.setHeight(20);
row.setHeightType(TableRowHeightType.Exactly);
@ -1370,8 +1370,8 @@ public class OutputWordUtil {
//将数据添加到其余行
for (int r = 0; r < data.length; r++) {
TableRow dataRow = table.getRows().get(r + 1);
dataRow.setHeight(25);
dataRow.setHeightType(TableRowHeightType.Exactly);
//dataRow.setHeight(25);
//dataRow.setHeightType(TableRowHeightType.Exactly);
for (int c = 0; c < data[r].length; c++) {
TableCell cell = dataRow.getCells().get(c);