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!

Excel file in Dreamweaver

Status
Not open for further replies.

Cgoode

Technical User
Sep 30, 2004
2
US
Ok I know this should be basic but I can't seem to find it in the help menu. I have an excel file on my page in dreamweaver. I need the uses to be able to open it in Excel not in their browser. Any hints?
 
it has to do with their browser integration....
test is here:

if IE is not intergrated to open it then users will download be prompt to Download or Poen it
U can always zip it up as alterntive to only download

All the best!


:--------------------------------------------------------------------------:
fugitive.gif

ok,ok...I did shoot the deputy but he told me he was the sheriff!
:--------------------------------------------------------------------------:
 
Yes we just ended up zipping and writing out instructions with how to unzip and save. Thanks!
 
easy $ :)

:--------------------------------------------------------------------------:
fugitive.gif

ok,ok...I did shoot the deputy but he told me he was the sheriff!
:--------------------------------------------------------------------------:
 
another alternative is this, create a file called download.asp with this code.
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
strFile = request.QueryString("file")
strOne = "attachment; filename=" & strFile
strTwo = "docs/" & strFile ' this is the relative route to the folder where your download files are placed
Response.Buffer=true
On Error Resume Next
'Create a stream object
Dim tfm_downloadStream
Set tfm_downloadStream = Server.CreateObject("ADODB.Stream")
tfm_downloadStream.Type = 1
tfm_downloadStream.Open
tfm_downloadStream.LoadFromFile Server.Mappath(strTwo)
If Err.number = 0 Then
  Response.Clear
  Response.ContentType = "application/octet-stream"
  Response.AddHeader "Content-Disposition", strOne
  Response.AddHeader "Content-Transfer-Encoding","binary"
  Response.BinaryWrite tfm_downloadStream.Read
  tfm_downloadStream.Close
  Set tfm_downloadStream = Nothing
  Response.End()
Else
  tfm_downloadStream.Close
  Set tfm_downloadStream = Nothing  
  Response.Redirect("oops.asp")
End If 
%>

Then just have a link to whatever file you want, like so
Code:
<a href="download.asp?strFile=mySpreadsheet.xls">Link</a>
Remember to create an error page called oops.asp

Cheech

[Peace][Pipe]
 
nice one CHeech!
they had a great navy force...now, programmes as well ;-)

:--------------------------------------------------------------------------:
fugitive.gif

ok,ok...I did shoot the deputy but he told me he was the sheriff!
:--------------------------------------------------------------------------:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top