Hi,
Hi Mudassir,
Thanks for getting back to me.
Basically i don't want to wrap the text in the statements column and want to fit the size of the cell to the size of the text.
So at the moment i am getting something like shown in pic 1.png.(Attached).
the code i am using for this is: (in .NET C#)
Cell tc = tbStatement.GetCell(columnPos, rowPos);
TextFrame tf = tc.TextFrame;
tf.WrapText = false;
tf.FitTextToShape();
But i want something like shown in Pic 2.png (Attached).
I am using Aspos.Slides Product version: 2010.08.12 File Version: 4.3.0.0
Let me know what do you think.
Thanks,
Mihir
Hi Mihir,
public static void TableExAnchoring(){PresentationEx pres = new PresentationEx();SlideEx slide = pres.Slides[0];TableEx table = null;int tableHeight = 300;int tableWidth = 200;int rowCount = 4;int columnCount = 3;double[] rowHeights = new double[rowCount];double[] columnWidths = new double[columnCount];double result = (8 / 4) / 8.0;for (int i = 0; i < columnWidths.Length; i++){columnWidths[i] = (tableWidth / columnCount);}for (int i = 0; i < rowHeights.Length; i++){rowHeights[i] = (tableHeight / rowCount);}int tableIndex = slide.Shapes.AddTable(20, 40, columnWidths, rowHeights);TableEx newTable = (TableEx)slide.Shapes[tableIndex];foreach (RowEx row in newTable.Rows){row.MinimalHeight = 5;}TextFrameEx textFrame = null;for (int i = 0; i < rowCount; i++){for (int j = 0; j < columnCount; j++){textFrame = newTable[j, i].TextFrame;textFrame.Paragraphs[0].Portions[0].Text = “Sample”;textFrame.Paragraphs[0].Portions[0].Text = “Hello world. I am adding the Sample text. How are you. I will check the overlaping text”;// textFrame.Paragraphs[0].Portions[0].PortionFormat.FontItalic = NullableBool.True;textFrame.Paragraphs[0].Portions[0].PortionFormat.FontHeight = 8;}}pres.Write(“D:\Aspose Data\modifedNew2.PPTX”);}
Hi Mudssir,
Thanks for your concern. Can you suggest me some other options based on the version i have... Basically i don't want to wrap the text in the column 'Statements'. Also i can't set the width of the Cell object as it's saying it is read only.
Many Thanks,
Mihir
Hi Mihir,