Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Download from Web to Excel, Microsoft Money, Quicken, et
Message
 
À
03/02/2006 16:43:02
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01093378
Message ID:
01093567
Vues:
27
This message has been marked as the solution to the initial question of the thread.
Something like this:
SET TALK OFF
SET TEXTMERGE ON

CREATE CURSOR cs (firstname C(20), lastname C(30))
INSERT INTO cs VALUES ("Bill", "Gates")
INSERT INTO cs VALUES ("Steve", "Balmer")
INSERT INTO cs VALUES ("Bill", "Clinton")

cHtmlOutput=""

TEXT TO cHtmlOutput NOSHOW ADDITIVE
<table border=0 cellspacing=0 cellpadding=0>
ENDTEXT

SELECT cs
SCAN ALL

TEXT TO cHtmlOutput NOSHOW ADDITIVE
<tr>
<td width=100 valign=top><<ALLTRIM(cs.firstname)>></td>
<td width=160 valign=top><<ALLTRIM(cs.lastname)>></td>
</tr>
ENDTEXT

ENDSCAN

TEXT TO cHtmlOutput NOSHOW ADDITIVE
</table>
ENDTEXT

SET TEXTMERGE OFF
Then use Response object, or whatever way you have to create output (print or echo in PHP), to send this output back to browser.
Response(cHtmlOutput)
With those two headers in place, the browser will understande the whole transfer as a download of XLS file.

Everything mentioned is to be run on server side.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform