Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy file
Message
De
19/07/2004 17:18:00
 
 
À
19/07/2004 17:11:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00925927
Message ID:
00925942
Vues:
13
>hi,
>
>thank you very much,
>
>it works very well,
>
>i need som thing els if you can, evrey time the excel sheet(fields change some times 3 or 4 or etc..,how i can create mytable as the same number.of fields at excl sheet.
>i mean CREATE TABLE (thisform.text2.value)&& without fields (char1 C(10), char2 C(40),char3 C(10), char4 C(10) NOCPTRANS).creat fields as excel sheet autamticly.
>APPEND FROM c:\aax.xls TYPE XLS
>
>thanks again.

If you know what fields you have in your sheet, you can build up your entire CREATE TABLE command as a string and then execute it via a macro.

cCmd = "CREATE TABLE "+thisform.text2.value+" ("
cCmd = cCmd + yourfieldname1+" "+yourfieldtype+"("+yourfieldsize+"), " && repeat for all fields, leave comma off last field
cCmd = cCmd + ")"
&cCmd
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform