Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Generating doc files from ASP


Message #1 by Dennis <dennist@g...> on Fri, 9 Nov 2001 10:38:04 +0530
Hi coders,

              I am generating some content thru my ASP program, for 

example a Report containg tabular data, however I would like this to be 

created as a doc file.

I tried this by changing the ContentType of the RESPONSE object, 

however, I ended up with a doc file containing the HTML code of the 

resultant page. What I really wanted was for this page to contain the 

end-data not the code.



Can anyone help me on this.



Also I'd like some information on generating Excel & PDF files thru ASP.



Thanks in advance.

Dennis.

Message #2 by Dennis <dennist@g...> on Thu, 15 Nov 2001 13:00:40 +0530
Hi all,

              I am generating some content thru my ASP program, for 

example a Report containg tabular data, however I would like this to be 

created as a doc file.

I tried this by changing the ContentType of the RESPONSE object, 

however, I ended up with a doc file containing the HTML code of the 

resultant page. What I really wanted was for this page to contain the 

end-data not the code.



Can anyone help me on this.



Also I'd like some information on generating Excel & PDF files thru ASP.



(PS: Ken, Alex I was thinkin maybe u guys culd help me on this)



Thanks in advance.

Dennis.



Message #3 by riley@i... on Mon, 19 Nov 2001 21:33:52
There are all kinds of tutorials out there that explain how to create and 

write to a text file on the server.  I experimented using the .doc 

extension, instead of the .txt extension, and it worked great.  The cool 

thing is, you can create this file on the fly, and then direct your users 

browser to that file, and you get a Word container within the browser.  

You can do the same thing with excel files, but it's a little trickier.  

Excel can recognize html tables as tables, but you have to make sure that 

you have all the proper tags to make the column headings work correctly.  

I have seen several tutorials out there that talk about changing the 

contentType of the response object, but I'll be darned if I can make that 

work.. yet.



Best of luck.





> Hi coders,

>               I am generating some content thru my ASP program, for 

> example a Report containg tabular data, however I would like this to be 

> created as a doc file.

> I tried this by changing the ContentType of the RESPONSE object, 

> however, I ended up with a doc file containing the HTML code of the 

> resultant page. What I really wanted was for this page to contain the 

> end-data not the code.

> 

> Can anyone help me on this.

> 

> Also I'd like some information on generating Excel & PDF files thru ASP.

> 

> Thanks in advance.

> Dennis.


  Return to Index