Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Data Types Not Always Sticking
Message
From
27/01/2002 12:07:55
Larry Nobs
Nobs Computer Services, Inc.
Saint Peters, Missouri, United States
 
 
To
27/01/2002 05:45:01
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00611189
Message ID:
00611270
Views:
19
One thing I had not noticed until you pointed it out is that
? type(oexcel.cells(10,10).value)
without the quotes is improper syntax.

I was trying to create a reproducible error in my example.

I do have a problem in my application where I open an existing spreadsheet and do something like this:

m.serialnum = oxl.cells(10,10).value
if type('m.serialnum') = 'N'
oexcel.cells(10,10).numberformat = "@"
oexcel.cells(10,10).value = str(m.serialnum)
endif

Later in the process I will check again because m.serialnum will update a
character field in a record.

m.serialnum = oxl.cells(10,10).value
if type('m.serialnum') = 'N'
= messagebox('Hey, you should not be a number - I set you to character')
endif

I'll try to search my source for an actual example.


Thanks,


Larry Nobs
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform