title: How Transform GridView in Open XML Table
body: <p>I have a GridView and I want to export it in Word document using open XML table</p>
  
  <pre><code>var dt = FunctionThatReturnDataTable(id);            
  var gd = new GridView
               {
                  DataSource = dt,
                  AutoGenerateColumns = true
               };
  </code></pre>
  
  <p>I created a word document and inserted one paragraph inside, now i want to add my gridview below</p>
  
  <pre><code>using (var myDoc = WordprocessingDocument.Create(@"c:test.doc",
                                      WordprocessingDocumentType.Document))
  {                    
    MainDocumentPart mainPart = myDoc.AddMainDocumentPart();
    mainPart.Document = new Document();
    var body = new Body();
    var p = new Paragraph(new ParagraphProperties(
               new Justification() { Val = JustificationValues.Center }), 
                             new Run(new Text("Some Text")));
    body.Append(p);
    mainPart.Document.Append(body);
    mainPart.Document.Save();
  }
  </code></pre>