Problem in resizing the cell according to text size

Hi, i want to resize the cell size according to the text size. My text is in the format of

1.FactorLanguage_6_One

2.FactorLanguage_6_Two

3.parag

i want to resize my cell according to this.

Please help

Hi,

Thanks for considering Aspose.

I think you want multiline text in a cell. Please use Style.IsTextWrapped property. May the following code helps you for your need:

Workbook wb = new Workbook();
Worksheet ws = wb.Worksheets["Sheet1"];
Cells cell = ws.Cells;
cell[0, 0].PutValue("1. abcd\n2. wxyz");
cell[0, 0].Style.IsTextWrapped = true;
cell[1,2].PutValue("1.FactorLanguage_6_One\n2.FactorLanguage_6_Two\n3.parag");
cell[1, 2].Style.IsTextWrapped = true;
ws.AutoFitColumns();
ws.AutoFitRow(0);
ws.AutoFitRow(1);
wb.Save("d:\\test\\fit_contents.xls", FileFormatType.Excel2003);

Thank you.

Thanx a lot !!!

It worked for me :-)