Hi Team,
I'm Trying to add Font size to each row cell in my data table, but the applied font size is not binding if binding row cell by adding a new line in it.
I would like to apply font size to each row cell even if my row cell have a concatenation of multiple text or binding Title and in new line bind address1, address2 ect.,
Attached screen shot for reference on how it looks likes in presentation file.
Thanks in advance for your support.
Here is my code.
DataTable dt = new DataTable
dt.Columns.Add();
dt.Columns.Add();
dt.Rows.Add("About", "Age");
for(int i=0; i < listValues.Count ; i++){
string concatinateValue = listValues.Name + System.Environment.NewLine + listValues.Address1 + ", " + listValues.Address2;
dt.Rows.Add(concatinateValue, listValues.Age)
}
ITable table = ppt.Slides[0].Shapes.AppendTable(ppt.SlideSize.Size.Width /2 - 380, 185, widths, heights);
for(int i = 0; i< dt.Rows.Count ; i++){
for(int j=0; j < dt.Columns.Count; j++){
table[j,i].TextFrame.Text = dtConsequence.Rows[i][j].ToString();
//Set the font
table[j,i].TextFrame.Paragraphs[0].TextRanges[0].LatinFont = new TextFont("MyFont");
table[j,i].TextFrame.Paragraphs[0].TextRanges[0].FontHeight = 9f;
table[j,i].TextFrame.Paragraphs[0].TextRanges[0].Fill.FillType = Spire.Presentation.Drawing.FillFormatType.Solid;
}
}