我想在下面的代碼中添加gridview。
如何在Word文檔中添加Gridview?在word文檔中添加gridview
我的Word文檔創建代碼;
object missing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.Application();
Microsoft.Office.Interop.Word.Document aDoc = null;
DateTime today = DateTime.Now;
object readOnly = true;
object inVisible = true;
aDoc = wordApp.Documents.Open(ref fileName, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref inVisible, ref missing, ref missing, ref missing, ref missing);
this.FindAndReplace(wordApp, "##formkodu##", TextBox1.Text);
this.FindAndReplace(wordApp, "##sirketadi##", DropDownList11.SelectedItem.Text);
this.FindAndReplace(wordApp, "##il##", ddliller.SelectedItem.Text);
this.FindAndReplace(wordApp, "##isletme##", ddlisletmeler.SelectedItem.Text);
this.FindAndReplace(wordApp, "##yüklenicifirma##", ddlyükleniciler.SelectedItem.Text);
wordApp.Visible = false;
aDoc.Activate();
aDoc.SaveAs(ref saveAs, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
wordApp.Quit(ref missing, ref missing, ref missing);
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(aDoc);
不解決如何添加GridView的問題。 –