Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dates NumberFormat problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01379313
Message ID:
01379315
Vues:
22
>Hi everybody,
>
>I use Copy to (lcFile) type XLS and then apply custom formatting using the array of field names.
>
>Here is the code I just tried
>
>
>IF !EMPTY(taHeader_Info[m.lnK,3]) && There is format information
>				loRange = loSheet.UsedRange.Offset(m.lnLines + m.lnOffset) && we don't want to apply format for header rows
>				loRange.COLUMNS[m.lnK].Select
>				*loRange.COLUMNS[m.lnK].NumberFormat = taHeader_Info[m.lnK,3]
>				loExcel.Selection.NumberFormat = taHeader_Info[m.lnK,3]
>			ENDIF
>
>
>Unfortunately, it is still not working for dates.
>
>Is there any way to make number format to work on the existing spread sheet?
>
>Thanks a lot in advance.

How about:

loExcel.Selection.NumberFormat = "mm/dd/yy;@"
(not tested!)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform