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

Free Support Forum - aspose.com

Merge cells in one row fails

Hi guys.

we try to merge some cells in table:

Dim lpres As New Aspose.Slides.Presentation(“c:\temp\sample.pptx”)
Dim lslide As Slide = lpres.Slides(0)
Dim lshape As Table = lslide.Shapes(0)
lshape.MergeCells(lshape(2, 0), lshape(3, 0), False)
lshape.MergeCells(lshape(3, 0), lshape(4, 0), False)
lpres.Save(“c:\temp\sample2.pptx”, Export.SaveFormat.Pptx)
Process.Start(“c:\temp\sample2.pptx”)

i attached 3 presentations
sample.pptx contains the source file
sample2.pptx contains the result through Aspose.slides 14.8
sample_desired_result.pptx is the expected result done with powerpoint.

may you can explain what goes wrong.
best regards
Kai

Hi Kai,

Thank you for sharing the files.

Please update the code as mentioned below to achieve your desired results. You need to merge Cell 2 with 3 and then Cell 4 with 5 to achieve your desired results.


Dim lpres As New Aspose.Slides.Presentation(“d:\data\sample.pptx”)

Dim lslide As Slide = lpres.Slides(0)

Dim lshape As Table = lslide.Shapes(0)

lshape.MergeCells(lshape(2, 0), lshape(3, 0), False)

lshape.MergeCells(lshape(4, 0), lshape(5, 0), False)

lpres.Save(“d:\data\sample2.pptx”, Export.SaveFormat.Pptx)

Process.Start(“d:\data\sample2.pptx”)


In case you need any further assistance, please feel free to contact support.

Thanks & Regards,