title: How to create a Cell Format correctly?
body: <p>I have a two Cell Formats:</p>
  
  <pre><code>          var stylesPart = spreadsheetDocument.WorkbookPart.AddNewPart&lt;WorkbookStylesPart&gt;();
             stylesPart.Stylesheet = new Stylesheet();
  
             // blank font list
             stylesPart.Stylesheet.Fonts = new Fonts();
             stylesPart.Stylesheet.Fonts.Count = 2;
             stylesPart.Stylesheet.Fonts.AppendChild(new Font(new Bold(), new FontSize() {Val = 14}));
             stylesPart.Stylesheet.Fonts.AppendChild(new Font(new FontSize() {Val = 12}));
  
             // cell format list
             stylesPart.Stylesheet.CellFormats = new CellFormats();
             stylesPart.Stylesheet.CellFormats.AppendChild(new CellFormat { FormatId = 0, FontId = 0, ApplyFont = true });
             stylesPart.Stylesheet.CellFormats.AppendChild(new CellFormat { FormatId = 1, FontId = 1, ApplyFont = true });
             stylesPart.Stylesheet.CellFormats.Count = 2;
  
             stylesPart.Stylesheet.Save();
  </code></pre>
  
  <p>And when i use any of them to create my Excel document i get a message when tried to open document that document have an error in <code>/xl/styles.xml (Styles)</code>;</p>
  
  <p>Whats can be wrong?</p>