Inserting Web Controls into Word

Hi All

I am looking for a component that will do 2 things…

  1. Insert a Gridview into Word

  2. 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

Ah, I see what the problem is, its being truncated due to the length of the Gridview.

I know its probably a hard question but what would the component be like exporting a Gridview of approx. 5000 rows? In the region of 190 pages… within a multi user environment?

Many thanks in advance for you time.

Rit

Hi

Is it possible to acquire a temporary full licence to test a full report? I have checked out inserting images and this seems perfect!

Many thanks

Rit

Thanks for your interest in Aspose.Words.

Yes, you can easily get the temporary full license for product testing. You just need to follow the procedure described here:
https://docs.aspose.com/words/net/licensing/

Please let me know if you have any other questions. I will be happy to assist you with whatever I can.

Best regards,