Hi,
Well, Aspose.Cells for .NET does support to auto-wrap the text, just set the AutoSize property of the text frame to set to false, see the code below:
//Instantiate a new Workbook.
Workbook workbook = new
Workbook();
//Get the first worksheet in the book.
Worksheet worksheet = workbook.Worksheets[0];
//Add a
new textbox to the collection.
int textboxIndex =
worksheet.TextBoxes.Add(2, 1, 160, 200);
//Get the
textbox object.
Aspose.Cells.Drawing.TextBox textbox0 =
worksheet.TextBoxes[textboxIndex];
//Fill the text
without text wrap.
textbox0.Text = “ASPOSE______The .NET
& JAVA Component Publisher!”;
//Fill the text with
desired text wrap.
// textbox0.Text = “ASPOSE______The
.NET & JAVA\n Component Publisher!”;
//Get the
textbox text frame.
MsoTextFrame textframe0 =
textbox0.TextFrame;
//Set the textbox not to adjust it
according to its contents.
textframe0.AutoSize = false;
//Set the placement.
textbox0.Placement =
PlacementType.FreeFloating;
//Set the font color.
textbox0.Font.Color = Color.Blue;
//Set the font to
bold.
textbox0.Font.IsBold = true;
//Set
the font size.
textbox0.Font.Size = 14;
//Set font attribute to italic.
textbox0.Font.IsItalic =
true;
//Get the filformat of the textbox.
MsoFillFormat fillformat = textbox0.FillFormat;
//Set the
fillcolor.
fillformat.ForeColor = Color.Silver;
//Get the lineformat type of the textbox.
MsoLineFormat
lineformat = textbox0.LineFormat;
//Set the line style.
lineformat.Style = MsoLineStyle.Single;
//Save the
excel file.
workbook.Save(“e:\test\tbox.xls”);
Thank you.