Poi generates PPT to create a table how to set the width and height of the table

the code is as follows:

    File f = new File("D://demo.pptx");
    
    InputStream in = new FileInputStream(f); 
    XMLSlideShow slideShow = new XMLSlideShow(in);
    
    XSLFSlideLayout layOut = slideShow.getSlideMasters()[0].getLayout(SlideLayout.CUST);
    
    XSLFSlide slide = slideShow.createSlide(layOut);
    
    XSLFTable table = slide.createTable();
    //
    XSLFTableRow titleRow =  table.addRow();
    titleRow.setHeight(44.15);
    //
    XSLFTableRow contentRow =  table.addRow();
    contentRow.setHeight(94.4);
    
    String tableTitles[] = new String[]
            {"AAA","BBB","CCC","DDD","EEE","FFF","GGG"};

    String content[] = new String[]
            {"1","2","3","4","5","6","11"};
    
    for(int x = 0 ; x < tableTitles.length ; xPP){
        XSLFTableCell titleCell =  titleRow.addCell();
        titleCell.setBorderBottomColor(new Color(149,179,215));
        XSLFTextRun textRun = titleCell.addNewTextParagraph().addNewTextRun();
        textRun.setFontSize(14);
        textRun.setFontColor(Color.BLACK);
        textRun.setFontFamily("");
        textRun.setText(tableTitles[x]);
        titleCell.addNewTextParagraph().setTextAlign(TextAlign.CENTER);//
        titleCell.setFillColor(new Color(219,229,241));
        titleCell.setBorderLeft(1);
        titleCell.setBorderRight(0.5);
        titleCell.setBorderTop(1);
        titleCell.setBorderBottom(1);
        
        XSLFTableCell contentCell =  contentRow.addCell();
        contentCell.setText(content[x]);
    }
    
    table.setAnchor(new Rectangle2D.Double(18.8,200,60,9000));
    
    System.out.println(table.getAnchor().getWidth());
    
    slideShow.write(new FileOutputStream("D:/xxx.pptx"));

table.setAnchor (new Rectangle2D.Double (18.8 table.setAnchor) (18.8));) sets the X Y position as well as the width and height of the table.
but the output file. It is found that the width and height set has no effect. Ask the great god for an answer. No, no, no.

poi version is 3.9

Mar.21,2021

try to set the cell width

table.setColumnWidth(ind, width);
  • Delete row operation Minumum row number is 0 on poi export

    java.lang.IllegalArgumentException: Minumum row number is 0 error is reported when exporting excel data specific errors are as follows: 17 47 16 46 15 45 14 44 13 43 12 42 java.lang.IllegalArgumentException: Minumum row number is 0 at org.apache.p...

    Mar.16,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b25f-2c256.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b25f-2c256.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?