Reply to topic  [ 2 posts ] 
response object 
Author Message

Joined: Fri Apr 11, 2008 5:50 am
Posts: 1
Reply with quote
Post response object
Is it posible to open the open/save dialog instead of writing the file to the harddrive in ASP using easy_WriteExcelFile() ?

with regards

Fri Apr 11, 2008 5:53 am

Joined: Fri Feb 03, 2006 12:23 pm
Posts: 166
Location: Brasov, Romania
Reply with quote
If you are using ASP.NET, yes it is possible, see this post:

If you are using ASP (VBScript), you must fist save the file on the harddrive and later to open the file using this code:
Dim strXlsFileName

strXlsFileName = Server.MapPath("<yourFileAndAppRelative>")
Dim objFileSystem
Set objFileSystem = Server.CreateObject("Scripting.FileSystemObject")

If objFileSystem.FileExists(strXlsFileName) Then
Dim objStream
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = 1 'Binary Type
objStream.LoadFromFile strXlsFileName

Response.ContentType = "application/octet-stream"
Response.AddHeader "Content-Disposition", "attachment; filename=" & strXlsFileName & ""

Response.BinaryWrite objStream.Read
Set objStream = Nothing

End If

Mon Apr 14, 2008 6:31 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.