Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Html
Message
 
À
20/09/2002 21:15:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Re: Html
Divers
Thread ID:
00702988
Message ID:
00702992
Vues:
12
>how do i convert my tabel (.dbf) into html style

Here are few ways:
1) In the IDE, browse the table, then click FILE, then SAVE AS HTML
2) Programatically with genhtml (see 'Genhtml.prg' in the VFP help) Example:
DO (_GENHTML) WITH "test.html", "test.dbf", 2
3) Create your own routine
LOCAL lnFieldNum as Integer
LOCAL lnFieldTotal as Integer
LOCAL lcHTML as String

CLOSE ALL
USE HOME()+"samples\data\customer.dbf"
lnFieldTotal = FCOUNT() 
lcHTML = "<HTML><BODY><TABLE BORDER = '1'>"
SCAN
	lcHTML = lcHTML + "<TR>"
	FOR lnFieldNum = 1 TO lnFieldTotal
		lcHTML = lcHTML + "<TD>" + TRANSFORM(EVALUATE("customer." + FIELD(lnFieldNum))) + "</TD>"
	ENDFOR
	lcHTML = lcHTML + "</TR>"	
ENDSCAN
lcHTML = lcHTML + "</TABLE></BODY></HTML>"
STRTOFILE(lcHTML,"test.html")
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform