html to Word Document Converter using Open XML SDK
By using Open XML SDK 2.0 you can generate the word document without using Interop dlls and without the requirement to install Office in your web server. I have done it successfully with the help of my colleagure Yesha Gupta and below is the code to generate the word document from the html code. GenerateWordDocument() public void generateWordDocument() { WindowsIdentity currentUserIdentity = (WindowsIdentity)User.Identity; WindowsImpersonationContext impersonationContext = currentUserIdentity.Impersonate(); try { string fileName = currentUserIdentity.Name.Replace( "\\", " _ ") + " _Report.docx "; string filePath = " ~/assets/Templates/ " + fileName; File.Copy(Server.MapPath(" ~/assets/Templates/WordDocTemplate.docx "), Server.MapPath(filePath)); DataView view = frontMatterSqlDataSource.Select(DataSourceSelectArguments.Empty) as DataView; string pageTitle = " "; using (WordprocessingDocument wordDoc = Wordprocessing
words are very close to the heart :)
ReplyDeletenice choice of song...
Khub bhalo.. thanks a lot...
ReplyDeleteaaj pochishe boishaakh,... khujte khujte ekhane asha...
please visit me here...
www.tanbangla.blogspot.com
you are welcome....apnar blog ey dhuke bhalo laglo...keep it up....
ReplyDeleteami mouthorgan er jonno ae gaan tar notations chai .. kothau pachi na :( .. kau ki help korte parbe amake .. khub upokrito hobo.. thanks in advance ..
ReplyDeleteRanbir Bhattacharjee
amar kase notation gulo nai. tobe ami try kore dekhbo. ami amar senior ek bhai k ask korbo. dekhi pele janabo apnake.
ReplyDelete