private static void GenerateColumns(XlWorksheet ws, Md.TableColumn[] cols) { uint cn = 1; for (int ci = 0; ci < cols.Length; ci++) { Md.TableColumn col = cols[ci]; if (col.Width == null) { ws.AppendColumn(cn, cn, true); } else { Double.TryParse(col.Width, out Double width); ws.AppendColumn(cn, cn, false, true, width); } cn++; } }