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

Free Support Forum - aspose.com

Remove column from table has merged cells

For example table has 4 columns and 4 rows.
All cells in 4 row merged.

How I can delete column #2.
If I use code without split columns
– Table.Columns.RemoveAt(2, false); – this generate error

If I try split column 2 with columns 1 and 3:
for split columns 0,1 with column 2 ---- Table.Rows[4][2].SplitByColSpan(2);
for split column 3 with column 2 ----- Table.Rows[4][2].SplitByColSpan(2); — this generate error

How i can delete column 2?

One more issue I get, when required remove last column and clone slide:
my code:
Table.Rows[4][4].SplitByColSpan(4);
Table.Columns.RemoveAt(4, false);
var newSlide = Presentation.Slides.InsertClone(((ISlide)shape.Slide).SlideNumber, (ISlide)shape.Slide); — this return error - Object reference not set

@aaksenov,

I have observed the information shared by you and have not been able to completely understand the issue. Can you please share the source presentation, desired output presentation and used working sample code on your end. We will investigate the issue further on our end on provision of requested information.

AsposeSlide.Table.zip (2.4 MB)
Example presentation and code for delete column. Required add your license to folder Resources and file name “Aspose.Slides.lic”

@aaksenov,

I have worked with the sample project shared by you and have been able to observe the issue specified. An issue with ID SLIDESNET-40416 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

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