So formatieren Sie die Zelle in XWPFTable in Apache POI

Ich bin in der Lage, erstellen Sie eine Tabelle in Apache POI in Wort ,mein Tisch kommt mit dem richtigen Wert, sondern was ich will, ich will, um zu verringern die Größe der Zellen der Spalte Größe in der Tabelle, wie Sie das tun ,bitte helfen..Hier ist was ich getan habe bis zu

              XWPFTable table = document.createTable(5,3);

        r3.setText("MSH Activity Score Card");
        r3.setBold(true);



        //creating first row 
        table.getRow(0).getCell(1).setText("Job ID#"); 
        table.getRow(0).getCell(2).setText("1362"); 

        //creating second row

        table.getRow(1).getCell(1).setText("Job Title#"); 
        table.getRow(1).getCell(2).setText("Global Network Architect Consultant");

        //creating third row
        table.getRow(2).getCell(1).setText("Client");
        table.getRow(2).getCell(2).setText("Carnival Corporation"); 

        //creating fourth row
        table.getRow(3).getCell(1).setText("Start Date");
        table.getRow(3).getCell(2).setText("11/13/2014");

       //creating fifth row
        table.getRow(4).getCell(1).setText("Days Old");
        table.getRow(4).getCell(2).setText("33");

        CTTblWidth width = table.getCTTbl().addNewTblPr().addNewTblW();

        width.setType(STTblWidth.DXA);
        width.setW(BigInteger.valueOf(1500));

Bin ich immer eine Tabelle mit Daten, aber ich möchte die Größe zu minimieren So formatieren Sie die Zelle in XWPFTable in Apache POI

Aber ich will diese GrößeSo formatieren Sie die Zelle in XWPFTable in Apache POI

  • jemand bitte helfen Sie mir
InformationsquelleAutor lucifer | 2014-12-18
Schreibe einen Kommentar