Free Support Forum - aspose.com

Table border in ppt

Hello,

I’m working on a project with an array. I masked the borders of the table is the creation but I have to display some borders for layout. I found on the site, the syntax for a pptx but not for a ppt.

My question is, how can I show the borderBottom of a particular cell?

I’ve try to do like in a pptx, but it’s not ok

Pending your answers

Sorry for my english, I’m a frenchy :slight_smile:

Hi Le Squeren,

Thanks for your interest in Aspose.Slides.

I have tried to understand your issue and based on my understanding, Please see the following code snippet to remove the table’s border of a particular cell. I have attached the source presentation file. The following code remove the border of first cell in a table except the bottom border.

Presentation srcPres = new Presentation(“d:\table.ppt”);
Slide srcSld = srcPres.GetSlideByPosition(1);
Table tbl = (Table)srcSld.Shapes[0];

//Aspose.Slides.Cell cl = tbl.GetCell(0, 0);
Aspose.Slides.Cell cell1 = tbl.GetCell(0, 0);
RemoveBorder(cell1.BorderTop);
RemoveBorder(cell1.BorderLeft);
RemoveBorder(cell1.BorderRight);

srcPres.Write(“d:\BorderRemoved.ppt”);


private void RemoveBorder(CellBorder border)
{
IEnumerator iter = border.GetEnumerator();
// Loop through all the lines
while (iter.MoveNext())
{
Aspose.Slides.Line line = (Aspose.Slides.Line)iter.Current;
line.LineFormat.ForeColor = Color.White;
// Setting the width of the top border
line.LineFormat.Width = 0;
}
}
Hope this answer your query. Please let us know If you have any further queries.

OK
Thank for this answer.

I’ve try, it’s ok.