Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>here is the Code which any one can use to convert the html page and get the Images also..</p> <pre><code> const string filename = "C:/Temp/test.docx"; Response.ContentEncoding = System.Text.Encoding.UTF7; System.Text.StringBuilder SB = new System.Text.StringBuilder(); System.IO.StringWriter SW = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlTW = new System.Web.UI.HtmlTextWriter(SW); tbl.RenderControl(htmlTW); string strBody = "&lt;html&gt;" + "&lt;body&gt;" + "&lt;div&gt;&lt;b&gt;" + htmlTW.InnerWriter.ToString() + "&lt;/b&gt;&lt;/div&gt;" + "&lt;/body&gt;" + "&lt;/html&gt;"; string html = strBody; if (File.Exists(filename)) File.Delete(filename); using (MemoryStream generatedDocument = new MemoryStream()) { using (WordprocessingDocument package = WordprocessingDocument.Create(generatedDocument, WordprocessingDocumentType.Document)) { MainDocumentPart mainPart = package.MainDocumentPart; if (mainPart == null) { mainPart = package.AddMainDocumentPart(); new Document(new Body()).Save(mainPart); } HtmlConverter converter = new HtmlConverter(mainPart); converter.BaseImageUrl = new Uri("http://localhost:portnumber/"); Body body = mainPart.Document.Body; var paragraphs = converter.Parse(html); for (int i = 0; i &lt; paragraphs.Count; i++) { body.Append(paragraphs[i]); } mainPart.Document.Save(); } File.WriteAllBytes(filename, generatedDocument.ToArray()); } System.Diagnostics.Process.Start(filename); </code></pre> <p>TO get the .dll files ..use Link <a href="http://notesforhtml2openxml.codeplex.com/documentation?referringTitle=Home" rel="nofollow">You can download notesfor.dll from here.</a></p> <p>It may be the name HTMLtoOpenXML.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload