Hello technical support team,
I tried to add a textbox to excel with formating the text, but the formating is not working.
Here is the code:
Shape shape = worksheet.Shapes.AddTextBox(2, 0, 5, 0, 100, 200);
string text = “Best.Nr.T875351\n(36 Stück)”;
shape.Text = text;
shape.Font.Name = “Tahoma”;
shape.Font.Size = 10;
shape.Font.IsBold = true;
shape.Font.IsItalic = true;
shape.TextHorizontalAlignment = TextAlignmentType.Center;
shape.TextVerticalAlignment = TextAlignmentType.Center;
And here is the result:
1. Attachment (fontname, fontsize, bold and italic is not working, textallignment of second line is not working)
2. Attachment, wished result.