Change column header text

Jul 31, 2013 at 12:34 PM
Hi guys,

I have a problem when trying to change column header text. Here is my code:
public class AbsentEmployee
    {
        [Display(Name = "Mã nhân viên")]
        public string EmployeeCode { get; set; }
        [Display(Name = "Họ tên")]
        public string EmpFullName { get; set; }
        [Display(Name = "Phòng ban")]
        public string Department { get; set; }
        [Display(Name = "Nghỉ từ ngày")]
        public DateTime FromDate { get; set; }
        [Display(Name = "Nghỉ đến ngày")]
        public DateTime ToDate { get; set; }
        [Display(Name = "Hình thức vắng mặt")]
        public string AbsenceType { get; set; }
    }
My method to export excel file:
FileInfo newFile = new FileInfo(file); ExcelPackage pck = new ExcelPackage(newFile);

        var wsData = pck.Workbook.Worksheets.Add("Absent Employee List");
        var dataRange = wsData.Cells["A1"].LoadFromCollection(
                from s in emps
                orderby s.EmployeeCode
                select s,
                true, OfficeOpenXml.Table.TableStyles.Medium2
                );
        wsData.Cells[2, 4, dataRange.End.Row, 4].Style.Numberformat.Format = "dd-mm-yyyy"
        wsData.Cells[2, 5, dataRange.End.Row, 5].Style.Numberformat.Format = "dd-mm-yyyy";

        wsData.Cells["A1"].Value = "Mã nhân viên"; // [1, 1]
        wsData.Cells["B1"].Value = "Họ tên"; // [1, 2]
        wsData.Cells["C1"].Value = "Phòng ban"; // [1, 3]

        dataRange.AutoFitColumns();

        pck.SaveAs(newFile);
The problem is the header texts still are EmployeeCode, EmpFullName, Department. So did i miss something? Thank you for your help.