poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jsaunders2011@gmail.com"<jsaunders2...@gmail.com>
Subject Delete Column from a XSLFTable
Date Mon, 25 Dec 2017 04:13:37 GMT
I need to delete a column from a table in a PPT slide. I don't see an method on XSLFTable that
will allow me to do this.  I've experimented extensively with this, but it doesn't work properly:

                         CTTableGrid tableGrid = table.getCTTable().getTblGrid();
    			CTTableCol[] columns = tableGrid.getGridColArray();
    			columns = ArrayUtils.remove(columns, columnIndexToDelete);
    			tableGrid.setGridColArray(columns);

It always seems to delete the last column of the table, regardless of the index passed in.
I've also tried this:

    			table.getCTTable().getTblGrid().removeGridCol(columnIndexToDelete);

It results in the same behavior. Any suggestions?

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


Mime
View raw message