Free Support Forum - aspose.com

Workign with Tables

I have to say i've worked with a number of 3rd party .NET libraries and all of them have great documentation making them very valuable for myself and my team. However i never seem to be able to find relevant examples or documentation for anything i want to do on your site. I rate it very poor and have serious question about the ease of use imparted by the design of the libraries i've used from your company. That said I have Aspose.Slides and that's what i have to use. I need help to figure out why i can't make simple formatting and layout aspects to work in a table in a PowerPoint presentation.

I'm adding text to a paragraph in each cell. and then i'm trying to set the font size so that the table fits on my slide. For some reason font always seems to default to 24pt bold with bullets. That seems incredibly aritrary and is real pain. I'm using this code below try to set my text formatting. Bullets go away but my font is still bold and the font size doesn't change. Debugging through everything seems to be getting hit in the code so it's not like some piece is just not executing. Any suggestions?

for (int r = 0; r < table.RowsNumber; r++)

{

for (int c = 0; c < table.ColumnsNumber; c++)

{

Aspose.Slides.Cell cell = table.GetCell(c, r);

if (cell != null)

{

if (cell.TextFrame != null)

{

foreach (Aspose.Slides.Paragraph para in cell.TextFrame.Paragraphs)

{

para.HasBullet = false;

foreach (Aspose.Slides.Portion portion in para.Portions)

{

portion.FontBold = false;

portion.FontHeight = 10;

}

}

}

}

}

}


This message was posted using Aspose.Live 2 Forum

Hi,

1) The documentation regarding Aspose.Slides for .NET provides you the basic concepts with code examples. For example, to work with tables, link is:

http://www.aspose.com/documentation/.net-components/aspose.slides-for-.net/working-with-tables.html

Similarly, to have a concept of formatting through portions, link is:

http://www.aspose.com/documentation/.net-components/aspose.slides-for-.net/managing-mutiple-paragraphs-with-mutilple-portions.html

2) The code example provided by you is working perfectly on my end. There may be two possibilities:

a) Something wrong with your presentation

b) The real code in your application may be different from the example posted