It seems that 
http://apache-poi.1045710.n5.nabble.com/HSLF-help-change-indentation-on-TableCell-td2300777.html
contrary to Yegor's advice , Table.setRowHeight should be used before the
shape is added.  It doesn't work otherwise in 3.6, 3.7beta2, 3.7beta3.  Is
this not the case for others?  The  code below works (and not the code in
the above post):

 SlideShow ppt = new SlideShow(); 
 Slide slide = ppt.createSlide(); 

 Table table = new Table(4, 4); 
 int width = 50; 
 int height = 135; 
 TableCell cell = null; 
 for (int i = 0; i < table.getNumberOfRows(); i++) { 
     for (int j = 0; j < table.getNumberOfColumns(); j++) { 
         cell = table.getCell(i, j); 

         RichTextRun r = cell.getTextRun().getRichTextRuns()[0]; 
         r.setText("helloworld"); 
         r.setFontName("Arial"); 
         r.setFontSize(10); 
         r.setTextOffset(0);    
     } 
 } 
 table.setAllBorders(new Line());
 
for (int i = 0; i < table.getNumberOfRows(); i++) table.setRowHeight(i,
height); 
 slide.addShape(table); 

 //set table dimensions 
 for (int i = 0; i < table.getNumberOfColumns(); i++)
table.setColumnWidth(i, width); 
 table.moveTo(50,50); 
-- 
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/HSLF-Table-setRowHeight-not-working-tp3204229p3209533.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to