View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
You will first have to create the Excel file.  There are several options for this, the simplest being VFP's COPY TO TYPE XLS command.  Once you have the file data (or if you are serving a pre-existing Excel file), then you have two options:
  1. Save it to a location that is accessible directly from your web server and use the Response.Redirect command.
  2. Return the file data with the Response.Write object, after setting the content type to right mime type for Excel documents (see below).This technique is described in the "Returning Non-HTML Content" section of the Returning Content to the Browser topic of the FoxWeb documentation. The technique is illustrated in the sample download.fwx that is installed with FoxWeb.
I've seen the following mime types for .xls files, but I'm not sure which one works best.  You should do some Googling, or experiment to find out which works best:
  • application/excel
  • application/
  • application/x-excel
  • application/x-msexcel
FoxWeb Support Team email
Sent by George Gambill on 08/31/2008 02:08:20 PM:
I need to send an Excel file (created by FoxWeb) such that the clients gets the "Open or Save" option (screen).

Any suggestions?