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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Excel file outside of web browser

Status
Not open for further replies.

apple17

Programmer
Jul 5, 2005
46
US
I've created an Excel file with the user's specified data on the server. If the user downloads the file, they can open it in Excel,no problem.

If the user chooses to open the file, it opens in Excel within the browser window. I would much prefer it to open in Excel. The users aren't going to know how to save from the browser window.

I've read a little about opening it outside the browser and all the solutions I've seen require configuration of the browser by the user.

Does anyone have any solutions that don't require the user to change their browser settings?

Thanks!!!
 
It's hard to help without any code. Just a suggestion.

I think it's probably how you format the excel they download which makes the difference. I have tried it and used something like this in the past.

Code:
<%Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment;filename=Onsite_Shopping_List_Alpha.xls"

....

%>
<table border="1">
<%
do while not rs.eof 
  response.write "<tr>"
  <td><%=rs("Item1")%>&nbsp;</td>
  <td><%=rs("Item2")%>&nbsp;</td>
  <td><%=rs("Item3")%>&nbsp;</td>
  response.write "</tr>"
  rs.movenext
loop
 
This is something I have been trying to figure out for years now and I don't think there is a way that doesn't involve the user changing their settings.

You have to go Tools...Folder options, select XLS, click 'Advanced' and untick the 'Browse in same window' box.

If you could identify what part of the registry this was in you could possibly give users a link to a .REG file which they could merge to update their settings in an idiot proof way. You would also have to give them a .REG file to restore their settings.

This also applies to any other office files - eg word, ppt etc.
 
emozley, that's the sense I got. I found one solution that claims to work, however, it involves the user downloading an ActiveX control. That presents a whole new set of issues.

So I've told my users to download the file then open it in Excel. That seems to be the simplest approach for 'non-technical users'.

 
This sounds like it is on an intranet sense you seemingly can change the registry and or browser settings and not public. This suprises me you are having so many problems. After a few years at that.

First if you have already found the methods in which to have the user create the excel book and save it thus then uploading it all you need to do is go backwards from those steps and do the next phase on the client.

One very important thing to remember while writing server side pages in a closed walls application no matter what the language may be or platform is there is a place for served pages and a place for client processes. I've seen so many programmers beating their heads on the wall trying to make server scripting do just so many things it is not intended to do.

In saying all that mumbo jumbo....

General FAQ faq333-2924
5 steps to asking a question faq333-3811
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top