CellRange cell = workbook.Worksheets[0].Range["A1"];
cell.Value = "Hello world";
sheet.AutofitColumn(1, 1, 1);
double width = cell.ColumnWidth;
string texta = "Securities of a single corporate issuer (excluding Schedule 1 Banks) as a % of the total portfolio a";
string textb = "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiia";
wsHeader.Range[1, 1].Style.Font.FontName = "Arial Narrow";
wsHeader.Range[1, 1].Style.Font.Size = 10;
wsHeader.Range[1, 1].Text = texta;
wsHeader.AutofitColumn(1, 1, 1);
double sizea = wsHeader.Range[1,1].ColumnWidth;
wsHeader.Range[2, 1].Style.Font.FontName = "Arial Narrow";
wsHeader.Range[2, 1].Style.Font.Size = 10;
wsHeader.Range[2, 1].Text = textb;
wsHeader.AutofitColumn(2, 1,2);
double sizeb = wsHeader.Range[2, 1].ColumnWidth;
headerPack.SaveToFile(headerPath, ExcelVersion.Version2010);
//set font, size & style
Font f = new Font("Microsoft Sans Serif", 14, FontStyle.Regular);
//create a bmp / graphic to use MeasureString on
Bitmap b = new Bitmap(1, 1);
Graphics g = Graphics.FromImage(b);
//measure the string
SizeF sizeOfString = new SizeF();
sizeOfString = g.MeasureString("This is a text line", f);