We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

CellEx.splitByRowSpan() always throws Exception "Index must be greater than 0 and less than RowSpan"

I have the following simple example of a table with merged cells:

final PresentationEx pres = new PresentationEx();
final SlideEx slide = pres.getSlides().get(0);
final double[] cols = { 200, 200, 200 };
final double[] rows = { 50, 50, 50, 50, 50 };

final int idx = slide.getShapes().addTable(50, 50, cols, rows);
final TableEx table = (TableEx) slide.getShapes().get(idx);

table.mergeCells(table.get(0, 1), table.get(0, 2), true);
table.mergeCells(table.get(0, 2), table.get(0, 3), true);

pres.write(“C:\test_mergeDelete.pptx”);

so i get a table like that

what i want to do now is delete the 4th row (marked orange).
using
table.getRows().removeAt(3, true);
removes not only the 4th row, but also the 2nd and 3rd (because of the merged cell).

So i thought the setting the parameter withAttachedRows to false would do the trick,
but the call
table.getRows().removeAt(3, false);
always throws a PptxEditException “Some of row’s cells lay outside row.” So no solution there.

What I’m trying to do now is splitting the cell (0, 3) into two, so that I can easily delete my 4th row:
CellEx cell = table.get(0, 3);

System.out.println("-> rowspan " + cell.getRowSpan()); // gives me the value 3 as expected

cell.splitByRowSpan(2);
But again I’m running into exceptions, as the splitByRowSpan call ALWAYS throws the exception “Index must be greater than 0 and less than RowSpan”, no matter what value I put in (tried everything from 0 to 5).

Is there an official bug that splitByRowSpan isn’t working or am I doing something wrong here?

Thx for your help,
Christiane

Hi Christiane,


I have worked over the issue shared by you and have been able to observe the issue shared by you. Two separate issues with ID SLIDESJAVA-33119 for Aspose.Slides for Java and SLIDESNET-33121 for Aspose.Slides for .NET has been created in our issue tracking system to further investigate and resolve the issues. We will share the further information with you as soon as the issues will be resolved.

We are sorry for your inconvenience,

Hello!



Please could we have an update/estimation when this bug will be fixed.
We will not be able to deploy on production systems until this issue is
solved!



Regards,



Jörg

Hi Jörg,


I regret to share that I have verified from our issue tracking system and the issue is still unresolved. I have requested our development team to schedule the issue for initial investigation. I like to share that we are in phase of developing major feature porting tool that will port the features from Aspose.Slides for .NET to Aspose.Slides for Java. This will provide added functionality and much stable product version. We may need some time to complete this. We will share the information with you as soon as the issue will be resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-33119) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as SLIDESNET-33121) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.