>I have been asked to create some web based reports that will end up
>being Excel spreadsheets that need to be displayed in IE. For instance,
>I will have an on-line input page that will request a begin and end date
>range. Those range values will be used to create an Excel file. Now I want to display the Excel file in the browser (IE only is ok). I know that if I have a hyperlink to an Excel file on the web that it will show up in IE with no problem.
>
>How can I create an ASP app that will display the formatted Excel file once the VFP program finishes populating the Excel file? I got the following response from the west-wind site but it has not worked for me.
>
> You need to set the content type to "application/vnd.ms-excel" and return
> the contents of the file using Response.BinaryWrite().
>
>When I tried:
>
> response.contenttype = "application/vnd.ms-excel"
> cfile = "c:\temp\excel_file.xls"
> response.binarywrite(cfile)
>
>All that was returned to the browser was the filename 'c:\temp\excel_file.xls'
>
>Can this be done?
Tom,
Instead of binary file I would just send the HTM created. Save as HTML from excel, and response.Write(FileToStr('saved.htm')) or redirect to saved.htm.
Cetin