Free Support Forum - aspose.com

Changes in tables get lost after update

Hi,

I have a ppt presentation with some tables in it. I use Aspose.Slides to change some text in these tables, to add / delete rowas and columns.

A few days ago I updated to the lateste version. Since then the changes I make to the tables do not show, when opening the file. When I use the savetoPDF method the changes are correct.

Please help!

Christian

Hi Christian,

Can you please provide the presentation for investigation?

Here you are. It happens on both pages. What is kind of strange, is the fact that the second table on slide 2 sometimes changes, sometimes not...

You find the pdf created by savetopdf() as well...

Thanks!

Hi,

I did not find any problem. Attached is the ppt produced as a result of the following code:

Presentation pres = new Presentation("test2.ppt");

Slide sld= pres.GetSlideByPosition(1);

foreach( Aspose.Slides.Shape shp in sld.Shapes )

if (shp is Aspose.Slides.Table)

{

Aspose.Slides.Table tbl = (Aspose.Slides.Table)shp;

for (int i = 0; i < tbl.RowsNumber; i++)

for (int j = 0; j < tbl.ColumnsNumber; j++)

tbl.GetCell(j, i).TextFrame.Paragraphs[0].Portions[0].Text = "CELLL " + i.ToString() + j.ToString();

tbl.DeleteRow(0);

}

Slide sld1 = pres.GetSlideByPosition(2);

foreach (Aspose.Slides.Shape shp1 in sld1.Shapes)

if (shp1 is Aspose.Slides.Table)

{

Aspose.Slides.Table tbl1 = (Aspose.Slides.Table)shp1;

for (int k = 0; k < tbl1.RowsNumber; k++)

for (int l = 0; l < tbl1.ColumnsNumber; l++)

tbl1.GetCell(l, k).TextFrame.Paragraphs[0].Portions[0].Text = k.ToString() + l.ToString();

tbl1.DeleteRow(0);

}

pres.Write("test3.ppt");