Home > Blockchain >  Tickmark using epplus in C#
Tickmark using epplus in C#

Time:11-16

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: https://i.stack.imgur.com/v0Icx.png

this is how it must appear: https://i.stack.imgur.com/1qCBI.png

CodePudding user response:

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.

CodePudding user response:

it's solved, I was able to discover the problem in my own way, please note that Behnam's way is excellent also and can clarify the issue, but I did it in a different way. 1- I created an excel file containing the required symbol. 2- I changed the .xsls extension to .zip. 3- now I became able to show my excel file XML content and discover the actual Rng.Style.Font.Charset Thanks

  • Related