You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "ORANSKY, JEFF" <jo...@att.com> on 2012/02/09 19:43:03 UTC

Issue adding cell borders

I am having an issue setting borders in specific cells of a table use the hslf API for POI.  I am creating a table for Powerpoint and in the last column I want to put borders around that column.  This is from my code:

                  TableCell cell = table.getCell(tableRow, tableColumn);
                                if (tableColumn == lastColumn) {
                                        if (tableRow == 1) {
                                                cell.setBorderTop(borderLine);
                                        }
                                        if (tableRow == lastRow) {
                                                cell.setBorderBottom(borderLine);
                                        }
//                                      if (tableRow > 0) {
//                                              cell.setBorderLeft(borderLine);
//                                              cell.setBorderRight(borderLine);
//                                      }
                                }

If I just set the top border in row one it comes out fine, then I uncomment the tableRow == lastRow to set the bottom border and not only do no borders show up, but the table is completely collapsed and  you have to select the bottom and drag to resize the table.

Any idea why this is happening?

Jeff Oransky
Technical Architect, ACSI
jo8461@att.com




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org