Re: Delete Row from XSLFTable

2018-05-14 Thread Andreas Beeker
Mark is correct ... I've only added the create-slideshow part, to verify, that it is working when opening an existing file, i.e. otherwise [when creating a new file] the use case of removing rows wouldn't make sense anyway. So when getCTTable().removeTr(index) results in the same exception being

Re: Delete Row from XSLFTable

2018-05-14 Thread Mark Murphy
I'm thinking that this is a general rather than specific approach. Whether you remove one or many rows, that would happen in the place called // remove a row. On Mon, May 14, 2018 at 10:52 AM, jsaunders2...@gmail.com < jsaunders2...@gmail.com> wrote: > > > On 2018/05/11 14:30:44, Andreas Beeker

Re: Delete Row from XSLFTable

2018-05-14 Thread jsaunders2011
On 2018/05/11 14:30:44, Andreas Beeker wrote: > > What is the proper way to delete a row from an XSLFTable? > > If you aren't modify the table instance further, you can use > getCTTable().removeTr(index): > > // prepare some data > > ByteArrayOutputStream bos = new ByteArrayOutputStream(500

Re: Delete Row from XSLFTable

2018-05-11 Thread Andreas Beeker
> What is the proper way to delete a row from an XSLFTable? If you aren't modify the table instance further, you can use getCTTable().removeTr(index): // prepare some data ByteArrayOutputStream bos = new ByteArrayOutputStream(5); try (XMLSlideShow ppt = new XMLSlideShow()) { XSLFTable

Delete Row from XSLFTable

2018-05-10 Thread jsaunders2011
I cannot seem to find a way to delete a row from an XSLFTable. I am trying the following: private void removeRow(XSLFTable table, int rowIndex){ CTTableRow[] rows = table.getCTTable().getTrArray(); rows = ArrayUtils.remove(rows, rowIndex); t