Search code examples
c#excelasp.net-mvcms-officeepplus

Tickmark using epplus


My problem is, when I am trying to generate my Excel file I have some cells contains the tickmark symbol.

   using (ExcelRange Rng = wsSheet.Cells[col])
   {
     Rng.Value = Beneficiary.IDentityOrFamilyBookCheck;// this value is ü
     Rng.Style.Font.SetFromFont("Wingdings", 16);
     Rng.Style.Font.Charset = 178;
   }

in fact with the specified font and value it must appear as a check but it is not

This is how it actually appears

this is how it actually appears

This is how it must appear

this is how it must appear


Solution

  • Your Charset is wrong. Try Rng.Style.Font.Charset = 2; It is always good to do some reverse engineering. In this case create an Excel file with the Font and symbol you want and read the Style within your program.