How to fit a cell by changing height of the cell

Hi,

I need more help. I want to display all text in a cell. I used AutoFitColumn(iCol) and AutoFitRow(iRow).

It changed the width of cell. But I wish to change the height of cell only. can you give me a piece of code to do this.

Thanks,

David

Hi David,

Please use Style.IsTextWrapped for your need.

Here is a piece of code:

Workbook wb = new Workbook();
Worksheet ws = wb.Worksheets["Sheet1"];
Cells cell = ws.Cells;
cell[0, 0].PutValue("Voor meer informatie, nga naar");
cell[0, 0].Style.IsTextWrapped = true;
//cell.SetColumnWidth(0, 20);
ws.AutoFitRow(0);
wb.Save("d:\\test\\tstrowht.xls", FileFormatType.Excel2003);
Thank you.