code: public static void widthTable(XWPFTable table, float widthCM, int cols) {
          int width = (int)(widthCM/2.54*1440);
          CTTblPr tblPr = table.getCTTbl().getTblPr();
          if (null == tblPr) {
              tblPr = table.getCTTbl().addNewTblPr();
          }
          CTTblWidth tblW = tblPr.isSetTblW() ? tblPr.getTblW() : tblPr.addNewTblW();
          tblW.setType(0 == width ? STTblWidth.AUTO : STTblWidth.DXA);
          tblW.setW(BigInteger.valueOf(width));
  
          if (0 != width) {
              CTTblGrid tblGrid = table.getCTTbl().getTblGrid();
              if (null == tblGrid) {
                  tblGrid = table.getCTTbl().addNewTblGrid();
              }
  
              for (int j = 0; j < cols; j++) {
                  CTTblGridCol addNewGridCol = tblGrid.addNewGridCol();
                  addNewGridCol.setW(BigInteger.valueOf(width / cols));
              }
          }
      }
docs: 表格设置宽度，每列平均分布
  
  @param table
  @param widthCM
  @param cols