Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Word/Excel Documents in Browser

Status
Not open for further replies.

pankajv

Programmer
Jan 30, 2002
178
IN
We have a requirement where we need to display some excel and word documents on browser. Everything worked perfectly fine untill we started testing the code at client side. At client side the Word/Excel documents are opened as a separate application and are not displayed on the browser. Moreover as many word/excel applications are getting generated as many times the user has requested for the document. Can any one tell me what could be wrong? Do I need to make any setting related changes?
 
I can think of three distinct ways to create Excel documents via ASP. If you could specify a little more how your creating the documents than we may be able to help with specific solutions, otherwise, since the possible problems are differant dependant on which method you use, it would be difficult to provide a solution based on your explanation.

-Tarwn ________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
We have one screen, where the user enters the criteria to generate the document. On submitting the criteria the control goes to VB classes which fetches data from Database and builds the document and saved in some location. Then the control is send back to ASP, which provides the hanlde of the document(Path where the Document is saved) to the same ASP which then opens the document on the Browser.

Let me know if you need further details.
 
Ok, the reason your getting many copies built is in your explanation above. Every time someone accesses the page your application is making a new excel file and placing it on the server. On way to limit this would be to check the files befoprehand to make sure you don't already have one that satisfies the requirements from the user.
The best to way to handle this, however, would be to generate the xsl file inside your ASP script and then just write it to the screen after setting the ContentType of the Reopnse buffer to xsl. This way it opens in the browser, if the user wants to save it to their local machine they can, and there is never a copy created and left onthe server.

-Tarwn ________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
We are only passing the path(having a time stamp) of the newly created file to the ASP which is suppose to display it on the browser. Even if the user generates the document again having the same criteria, a New document is generated and should be displayed on the same browser.

In our develoment environment it work like this:
On scrn1 you click Generate Document. Scrn2 opens and displays the document. Now if on scrn1 user again clicks generate document, scrn2 get refreshes and displays the latest document.

At client side it works like this:
On scrn1 you click Generate Document. Scrn2 opens but the document is not displayed on the browser, Instead it displays the Word Application/Excel as if the user has clicked Program->Word/Excel. Now if on scrn1 user again clicks generate document, one more word/excel application is opened and the old one is still stays.

I hope I am not confusing you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top