title: Excel Open XML error: "found unreadable content" when creating simple example
body: <p>I am getting the ambiguous "excel found unreadable content" error when I try to open the document created by the following code:</p>
  
  <pre><code>public void GenerateWorkbookFromDB()
  {
      //Make a copy of the template file
      File.Copy(HttpContext.Current.Server.MapPath("ReportTemplate/test.xlsx"), HttpContext.Current.Server.MapPath("Reports/test.xlsx"), true);
  
      //Open up the copied template workbook
      using (SpreadsheetDocument myWorkbook = SpreadsheetDocument.Open(HttpContext.Current.Server.MapPath("Reports/test.xlsx"), true))
      {
          WorkbookPart workbookPart = myWorkbook.WorkbookPart;
          WorksheetPart worksheetPart = workbookPart.WorksheetParts.First();
          string origninalSheetId = workbookPart.GetIdOfPart(worksheetPart);
  
          WorksheetPart replacementPart = workbookPart.AddNewPart&lt;WorksheetPart&gt;();
          string replacementPartId = workbookPart.GetIdOfPart(replacementPart);
  
          OpenXmlReader reader = OpenXmlReader.Create(worksheetPart);
          OpenXmlWriter writer = OpenXmlWriter.Create(replacementPart);
  
          Row r = new Row();
          Cell c = new Cell();
          CellValue v = new CellValue();
          v.Text = "test";
          c.Append(v);
  
          while (reader.Read())
          {
              if (reader.ElementType == typeof(SheetData))
              {
                  if (reader.IsEndElement)
                      continue;
                  writer.WriteStartElement(new SheetData());
  
                  for (int row = 0; row &lt; 20; row++)
                  {
                      writer.WriteStartElement(r);
  
                      for (int col = 0; col &lt; 4; col++)
                      {
                          writer.WriteElement(c);
                      }
  
                      writer.WriteEndElement();
                  }
  
                  writer.WriteEndElement();
              }
              else
              {
                  if (reader.IsStartElement)
                      writer.WriteStartElement(reader);
                  else if (reader.IsEndElement)
                      writer.WriteEndElement();
              }
          }
          reader.Close();
          writer.Close();
  
          try
          {
              Sheet sheet = workbookPart.Workbook.Descendants&lt;Sheet&gt;().Where(s =&gt; s.Id.Value.Equals(origninalSheetId)).First();
              sheet.Id.Value = replacementPartId;
              workbookPart.DeletePart(worksheetPart);
          }
          catch (Exception ex) { }
      }
  }
  </code></pre>
  
  <p>any help or suggestions is much appreciated! :D</p>