Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Download from Web to Excel, Microsoft Money, Quicken, et
Message
 
To
03/02/2006 16:43:02
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01093378
Message ID:
01093567
Views:
28
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform