ASP.NET vs. Word, Take 2
Published October 12th, 2005 in asp.net, programmingSo I haven’t finished with this project, in fact I haven’t made it very far into it other than some initial research. Got to love the programming business, figure this out and at the same time get x, y, and z done. So what is the conclusion of the research? Well according to Microsoft, it isn’t very good practice to create Word documents from the server dynamically, at least not using the Word COM calls.
Why not?
Well because every request made for one of those documents instantiates a copy of Word. So if you had fifty people request a word document at a given time you have fifty copies of Word open and well that’s never good. I’ve also read that you have to have Word on the machine in order to use those COM calls. Can’t confirm or deny that one because any time I’ve ever done work with Office it’s been on one of my personal machines that’s always had Office on it anyways, and generally was just a program to leverage something in Office anyways. Like a few people have said and I’ll agree, there generally isn’t any reason to ever install Office on your server.
So what do you do?
Well the other solution (this is what I love about programming, there’s always another solution) is to use XML for the data and XSLT to transform the XML into a word document. This is about where I stopped for the day, keeping a link bookmarked (on my office PC so I can’t give it right now) that gives a good rundown on how to achieve this. Sounds good to me, I’ve been wanting a good excuse to devote time to learning how to use XSLT.
No Responses to “ASP.NET vs. Word, Take 2”
Please Wait
Leave a Reply