private static Dictionary <string, int> getPositionsDic(ExcelEngine excel, DataTable tbl) { Dictionary <string, int> dic = new Dictionary <string, int>(); if (excel != null && tbl != null) { foreach (DataColumn col in tbl.Columns) { if (col.ColumnName == GiaoDanConst.DienThoai) { continue; } int idx = excel.FindColIndex(string.Format("[{0}]", col.ColumnName)); if (idx > -1) { if (beginDetailRow == -1 && col.ColumnName == GiaoDanConst.Phai) { beginDetailRow = excel.FindRowIndex(string.Format("[{0}]", col.ColumnName)); } dic.Add(col.ColumnName, idx); } } } return(dic); }