I am working with the PPTX version of the component and cant seem to figure out how to vertically align the text in a table cell (and textbox). Any help would be appreciated…
Hi Dmitri,
I have observed the requirements shared by you. Please use the following sample code to serve the purpose. Please share if I may help you further in this regard.
//Instantiate PresentationExPresentationEx pres = new PresentationEx();//Get the first slideSlideEx sld = pres.Slides[0];//Define columns with widths and rows with heightsdouble[] dblCols = { 250,150,50 };double[] dblRows = { 150,130,30,30,30 };//Add table shape to slideint idx = sld.Shapes.AddTable(100, 50, dblCols, dblRows);TableEx tbl = (TableEx)sld.Shapes[idx];tbl[0, 0].TextFrame.Text = “top”;tbl[0, 0].TextVerticalType = TextVerticalTypeEx.Vertical;tbl[0, 0].TextAnchorType = TextAnchorTypeEx.Center;//Write the presentation to diskpres.Write(“d:\Aspose Data\TextBox.pptx”);
Many Thanks,