Populate word with data
-
Hi, I have a word document i.e. the report I want. I have already written the lines i want in my document. The issue is I have 15 such files and I want to populate those documents with data from SQL. Is there any way to populate document with sql data. Not talking about export to word. Using Asp.net SQL 2012 TIA
-
Hi, I have a word document i.e. the report I want. I have already written the lines i want in my document. The issue is I have 15 such files and I want to populate those documents with data from SQL. Is there any way to populate document with sql data. Not talking about export to word. Using Asp.net SQL 2012 TIA
Sure, use OpenXML. There's a quick intro at: How to: Open and add text to a word processing document (Open XML SDK)[^]
-
Sure, use OpenXML. There's a quick intro at: How to: Open and add text to a word processing document (Open XML SDK)[^]
Thanks is there any expample online?? and will this dll cause any issue after publishing in server???
-
Thanks is there any expample online?? and will this dll cause any issue after publishing in server???
Yes, please feel free to Google them at your leisure. As for causing issues....like what? I honestly don't know a blessed thing about your server infrastructure and if adding document processing libraries has been known to cause it problems, I daresay that you have bigger issues to address than report generation.
-
Yes, please feel free to Google them at your leisure. As for causing issues....like what? I honestly don't know a blessed thing about your server infrastructure and if adding document processing libraries has been known to cause it problems, I daresay that you have bigger issues to address than report generation.
Thank you for your wonderful reply. by issue I mean Last time I used Interop and after publishing my code in server I was unable to generate any reports...
-
Thank you for your wonderful reply. by issue I mean Last time I used Interop and after publishing my code in server I was unable to generate any reports...
Office Interop is not supported in ASP.NET, or any other unattended application:
Considerations for server-side Automation of Office[^]
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
OpenXML is supported, and doesn't require Office to be installed on the server.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Office Interop is not supported in ASP.NET, or any other unattended application:
Considerations for server-side Automation of Office[^]
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
OpenXML is supported, and doesn't require Office to be installed on the server.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
I probably should have included that tidbit. I'm amazed that you didn't supply the GUIDs for the assemblies from memory. :-D