Hi All
I am looking for a component that will do 2 things…
-
Insert a Gridview into Word
-
Insert an image into Word. But not just reference the image but rather embed it so that it doesn’t rely on the original source/ location of the image on the web… if that makes sense.
Just dabbling with Aspose.Words, I am trying to render my Gridview control to get it to appear within my Word doc but am not having much luck. Can anyone tell me what I could be doing wrong?.. Basically all that happens at the moment is that my word doc is blank.
Dim doc As Document = New Document
Dim builder As DocumentBuilder = New DocumentBuilder(doc)
Dim stringWrite As System.IO.StringWriter = New System.IO.StringWriter
Dim htmlWrite As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(stringWrite)
GridView1.RenderControl(htmlWrite)
Dim htmlstuff = stringWrite.ToString
builder.InsertHtml(htmlstuff)
doc.Save("Report.doc", SaveFormat.Html, SaveType.OpenInWord, Response)
If I can get Aspose.Words to do the above 2 point I will definately purchase it to use within my latest project.
Many thanks
Rit