This project has moved and is read-only. For the latest updates, please go here.

Different Fonts - In-particular Wingdings

Jun 21, 2013 at 4:05 PM

So I'm trying to use the EPPlus dll to output a xlsx workbook for a report.
One of the requirements its to display char(254) in Wingdings (which should be a checkbox with a tick in it). However, when I open the generated spreadsheet I am seeing "þ" instead of the check box, even though the font set on the cell is wingdings.

If I click in the font box in excel and press return, the þ changes to the appropriate symbol.

Has anyone seen anything like this before, or have any form of explanation?

Code to generate the style:
var checkBoxStyle = package.Workbook.Styles.CreateNamedStyle("checkBox");
checkBoxStyle.Style.Font.SetFromFont(new System.Drawing.Font("Wingdings",10));
Code setting the cell value:
worksheet.Cells[rowCount, colCount].Value = Char.ConvertFromUtf32(254);
worksheet.Cells[rowCount, colCount].StyleName = checkBoxStyle.Name;
I'm really not sure what I'm doing wrong.