Hi,
PresentationEx pres = new PresentationEx();
SlideEx slide = pres.Slides[0];
double[] widths = new double[1];
double[] heights = new double[2];
widths[1] = 660;
for (int j = 0; j < 2; j++) heights[j] = 21;
int index = slide.Shapes.AddTable(0, 0, widths, heights);
TableEx pptTable = (TableEx)slide.Shapes[index];
For(i = 0; i < 2; i++)
{
CellEx pptCell = pptTable[0, i];
PlaceText(pptCell);
}
Private Void PlaceText(CellEx pptCell)
{
PresentationEx presen = new PresentationEx();
SlideEx sampleSlide = pres.Slides[0];
int index = sampleSlide.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, 1, 1, 100, 100);
AutoShapeEx shpx = (AutoShapeEx)sampleSlide.Shapes[index];
textFrame = shpx.TextFrame;
textFrame.AnchoringType = TextAnchorTypeEx.Center;
paragraph.ParagraphFormat.Alignment = TextAlignmentEx.Center;
textFrame.Paragraphs[0].Portions[0].Text = "Sample - Text";
}
Whenever I use the above code, even when I declare the height as 21 or 2. I am getting the same height for each cell. Also I am not able to reduce the Table Height appearing in the PPTX(Manually).
Kindly let me know if i am wrong.
Thanks,
Koundinya P