Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ExcelListener class placed in downloads
Message
From
02/01/2007 13:30:05
 
 
To
01/01/2007 21:40:59
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01180997
Message ID:
01181499
Views:
17
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
Previous
Reply
Map
View

Click here to load this message in the networking platform