New way of doing HTML/ASP > MS Word/Excel Doc


I have always dynamically created MS Word/Excel docs by creating a HTML/CSS-laden string, adding a few MS tags where needed (eg page setup stuff) and then giving it a .xls or .doc extension to force/create a file, but this seems to be dying out as the standard way of doing this.

I’ve tried to investigate what the latest way is that supersedes this tried and trusted method, but all I can find is a method where you try to zip-add an xml file into an docx/xlsx (zip archive) file, which looks mightily messy.

Could somebody please advise on what the latest method is to do this without using any form of bought-in component.

Thank you!



Hi admin401,

What application are you using to create MS docs this way?
(Please excuse me, I’m somebody that haven’t used Windows regularly since very long. :blush: )

I’ve tried to investigate what the latest way is that supersedes this tried and trusted method,

Could you please give a link to an example of this method, in case I’m not recognizing it properly?



Hi Erik

Thank you for coming back to me.

I use Classic ASP to build up/concat the required HTML, force the header to be excel or word and give the forced download an extension of .xls or .doc



Are your host pushing you to update to ASP.NET? MS sure are. Seems like you are left to continue with the method you already use. Can also non MS office suites render those docs correctly?

Found that you’ve cross-posted a copy of this topic at SO:

I’m aware that MS recommend SO for discussions, but Classic Asp topics might also be found at

Sorry I can’t help, maybe somebody knowledgeable in ASP could step in? :slight_smile:



You are unlikely to get much help in StackOverflow because the question is unclear.

It is not clear if you are doing that in the server. Please be specific; are you doing that in a web page anywhere?

That is really vague. What is the problem? What is the error message? What happens that is not supposed to happen or what does not happen that is supposed to happen?

I do not know what this is!

1 Like