Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Automation
Message
De
26/03/2003 19:03:57
 
 
À
26/03/2003 18:54:46
Bill Breay
Custom Business Software
Arvada, Colorado, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00770542
Message ID:
00770544
Vues:
15
>Hi All,
>
>I need some help with an Excel Automation process.
>
>I am creating an Excel worksheet from a VFP7 .prg OK and populating it OK from a .txt file, using the QueryTables.Add method. Everything works except being able to change the column format of a table. I then save the worksheet as a dbf4 formatted .dbf.
>
>The syntax formt for the column format taken from the Excel macro is:
> TextFileColumnDataTypes = Array(2,2,2,2,2,2,2) representing a 'Text' format.
>
>I need to change one of those columns to a date format and another to numberic.
>
>VFP does not like the Array() bit.
>
>I have tried setting up an array and entering:
> TextFileColumnDataTypes = @arrayname
>
>and it still doesn't like it.
>
>Any help would be appreciated.
>
>Regards,
>Bill
oExcel.Columns("A:A").Select()
oExcel.Selection.NumberFormat = "m/d/yyyy"

oExcel.Columns("B:B").Select()
oExcel.Selection.NumberFormat = "0"
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