Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Showing formatted Excel File in a browser?
Message
From
23/05/2001 16:59:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/05/2001 14:18:49
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00510518
Message ID:
00510611
Views:
15
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform