after exporting Data to XLS, we have an optional String that can be inserted as content for the first cell. Then the cell is formatted in a special way.
When this is done, we call AutoFitRow(1). This call never comes back and seems to loop. AutofitRow(1,1,1,false) behaves the same way.
This is the original code:
- Code: Select all
if (!String.IsNullOrEmpty(mAdditionalInfo))
{
sheet.InsertRow(1);
sheet[1, 1].Text = mAdditionalInfo;
sheet[1, 1].Style.Font.IsBold = true;
sheet[1, 1].Style.Font.Size = 14.0;
sheet[1, 1].Style.Font.Underline = FontUnderlineType.Single;
sheet.AutoFitRow(1);
}
If I remove sheet.AutoFitRow(1) everything ends correctly (except for the 1st row not being high enough ).
Is it a bug or am I doing sth. wrong?
Greetings
Detlef