Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel xlValues and Find
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
SAMBA Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01086704
Message ID:
01087160
Views:
42
This message has been marked as a message which has helped to the initial question of the thread.
>I've tried the constants. I get the OLE "type mismatch" error.
>
>>Search the download section, keyword "constants". You have #include files there, which define lots of constants for Excel and Word.
>>
>>>Hi all,
>>>
>>>I have over 5000 Excel documents that I need to rip data out of, but I can't seem to figure out how to tell the "find" command in Excel to not search the formulas, but the values only. Here is what I am trying.
>>>
>>>oExcel.Range('A1').Find("Street",,,,,,,,TRANSFORM(4294963133, "@0")).Select
>>>
>>>The transform command is what I've tried to use to get the hex value of the xlValues constant. Which I've also tried this way.
>>>
>>>#define xlValues 0xffffefbd
>>>
>>>And then using the xlValues, like this.
>>>
>>>oExcel.Range('A1').Find("Street",,,,,,,,xlValues).Select
>>>
>>>Which doesn't seem to work either.
>>>
>>>Any other suggestions?
>>>
>>>TIA

Paul,
The answer was #define xlValues -4163 as Hilmar and Boris already noted.
Clarification on it a bit.
#define xlValues 0xffffefbd
then it's an unsigned value in VFP but should be signed integer (-4163). You have VFP9. To create a correct header file do like this:

Modify command excelconstants.h [enter]

-Invoke object browser
-Add Excel.application (open type library -first icon-, COM librarires)
-Expand nodes
-Drag & drop "Constants" node on to code window opened (excelcontants.h)

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform