private void createFonts(WorkbookStylesPart stylesPart) { stylesPart.Stylesheet.Fonts = new Fonts(); // normal font var name = new FontName { Val = "Calibri" }; var size = new FontSize { Val = 10 }; stylesPart.Stylesheet.Fonts.AppendChild(new Font { FontName = name, FontSize = size }); // bold font for header var boldFont = new Bold(); stylesPart.Stylesheet.Fonts.AppendChild(new Font { FontName = (FontName)name.Clone(), FontSize = (FontSize)size.Clone(), Bold = boldFont }); stylesPart.Stylesheet.Fonts.Count = 2; }