I have attached an EXCEL spreadsheet and you can see that the column headers are wrapping as necessary. When the same workbook is saved as PDF, a couple columns do not wrap accordingly.
for (int col = 1; col < columnCount; col++)
{
Cell headerCell = cells[2, col];
Style headerCellStyle = headerCell.GetStyle();
headerCellStyle.IsTextWrapped = true;
headerCellStyle.HorizontalAlignment = TextAlignmentType.Center;
headerCellStyle.VerticalAlignment = TextAlignmentType.Center;
headerCell.SetStyle(headerCellStyle);
cells.SetColumnWidth(col, 11.22);
if (headerCell.StringValue.Length > 17)
{
cells.SetColumnWidth(col, 13.5);
}
}