Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ExcelListener class placed in downloads
Message
De
02/01/2007 13:30:05
 
 
À
01/01/2007 21:40:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01180997
Message ID:
01181499
Vues:
18
My date format is dd.mm.yyyy

In this case OpenOffice destroys dates and Excel does not open the file at all, shows error.
To fix this I changed IsNumber() to
LPARAMETERS tcContents
LOCAL llIsNumber
tcContents = ALLTRIM(tcContents)

DO CASE 
   CASE OCCURS('.', tcContents)>1
		llIsNumber = .F.

	CASE LEN(tcContents) = 0
		llIsNumber = .F.
	CASE LEN(CHRTRAN(tcContents,'0123456789.,$','')) = 0
		llIsNumber = .T.
	OTHERWISE
		llIsNumber = (LEFT(tcContents,1) = '-' AND LEN(CHRTRAN(SUBSTR(tcContents,2),'0123456789.,$','')) = 0)
ENDCASE
RETURN llIsNumber
Andrus
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform