Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem when try export part of web page into word docment application

Problem when try export part of web page into word docment application

Scheduled Pinned Locked Moved ASP.NET
tutorialquestionhtmlwpfdesign
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    smr85
    wrote on last edited by
    #1

    i have a web page and i need to export part of it into word docment,the part i need to export it somthing like datagrid but it is calnder control,i use this code Response.Clear(); Response.Buffer = true; Response.AddHeader("content-disposition", "attachment;filename=FileName.doc"); Response.ContentEncoding = System.Text.Encoding.UTF7; Response.ContentType = "application/vnd.word"; System.IO.StringWriter oStringWriter = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter); this.CalnderControl.RenderControl(oHtmlTextWriter); Response.Output.Write(oStringWriter.ToString()); Response.Flush(); Response.End(); my problem is how can i modify the properties of that output word docment,as example if i need the output of word docment to be in landscape mode and the another problem the output of this control is appear fine in the browser it render as html tables with cells but when be exported into word ,there are alot of additional cells appear and the word docment make this cells appear ,however the html output contain the true styles but i think somthing like borders the word couldnot understand it So Can any one know how to export part of webpage into word docment that i can set some proberties to the output word docment,and make it appear as it appear in the browser?? and what i notic that in the result of that docment that it appear without that addtional cells in the reading outline view but the another views appear with that addtional cells,

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups