C
CJM
[Sorry - having a bad day! Ignore the previous thread]
I have a page which allows the user to open one of several spreadsheets by
streaming the XLS to the client.
On my development site, everything appears to work fine. On the live site,
it works fine for the vast majority of users, but not for my colleague & I.
When this page is called with the correct inputs, the standard
Open/Save/Cancel/More Info dialog should appear. In the dialog, it gives the
following details:
Filename: Gothenburg Sweden.xls
File type: Microsoft Excel Spreadsheet
From: Servername
Clicking on open, means that the file will be opened in the local copy of
Excel; this works for most people, except one colleague and myself. In our
case, after clicking on Open, we get the following error msg:
"Internet Explorer cannot open travel.asp?journey=1 from <servername>
Internet Explorer was not able to open this internet site. The requested
site is either unavailable or cannot be found. Please try again later."
Anybody got any ideas about this?
TIA
Chris
Code Snippet:
sFileDir = Application("XLSDir")
If Len(sJourney) then
Select Case sJourney
Case 1
sFileName = "Gothenburg Sweden.xls"
sFilePath = sFileDir & sFilename
Response.AddHeader "content-disposition","attachment; filename=" &
"Gothenburg Sweden.xls"
Case 2
sFileName = "Nyköping Sweden.xls"
sFilePath = sFileDir & sFilename
Response.AddHeader "content-disposition","attachment; filename=" &
"Nyköping Sweden.xls"
Case Else
Response.Redirect "travel.asp"
End Select
' Create your header information
Response.ContentType = "application/asp-unknown"
' Create and configure your object
Set oFStream = Server.CreateObject("ADODB.Stream")
oFStream.Open()
oFStream.Type = 1
oFStream.LoadFromFile(sFilePath)
' Stream it to the client
Response.BinaryWrite oFStream.Read()
' Cleanup
oFStream.Close
Set oFStream = Nothing
' force the end
Response.End
End If
I have a page which allows the user to open one of several spreadsheets by
streaming the XLS to the client.
On my development site, everything appears to work fine. On the live site,
it works fine for the vast majority of users, but not for my colleague & I.
When this page is called with the correct inputs, the standard
Open/Save/Cancel/More Info dialog should appear. In the dialog, it gives the
following details:
Filename: Gothenburg Sweden.xls
File type: Microsoft Excel Spreadsheet
From: Servername
Clicking on open, means that the file will be opened in the local copy of
Excel; this works for most people, except one colleague and myself. In our
case, after clicking on Open, we get the following error msg:
"Internet Explorer cannot open travel.asp?journey=1 from <servername>
Internet Explorer was not able to open this internet site. The requested
site is either unavailable or cannot be found. Please try again later."
Anybody got any ideas about this?
TIA
Chris
Code Snippet:
sFileDir = Application("XLSDir")
If Len(sJourney) then
Select Case sJourney
Case 1
sFileName = "Gothenburg Sweden.xls"
sFilePath = sFileDir & sFilename
Response.AddHeader "content-disposition","attachment; filename=" &
"Gothenburg Sweden.xls"
Case 2
sFileName = "Nyköping Sweden.xls"
sFilePath = sFileDir & sFilename
Response.AddHeader "content-disposition","attachment; filename=" &
"Nyköping Sweden.xls"
Case Else
Response.Redirect "travel.asp"
End Select
' Create your header information
Response.ContentType = "application/asp-unknown"
' Create and configure your object
Set oFStream = Server.CreateObject("ADODB.Stream")
oFStream.Open()
oFStream.Type = 1
oFStream.LoadFromFile(sFilePath)
' Stream it to the client
Response.BinaryWrite oFStream.Read()
' Cleanup
oFStream.Close
Set oFStream = Nothing
' force the end
Response.End
End If