Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Operator mismatch
Message
De
23/05/2010 16:47:38
 
 
À
23/05/2010 16:22:52
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
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 SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01465616
Message ID:
01465652
Vues:
36
Do you know by any chance a different approach then?
thanks

>>I am using this code snippet below and getting the operator/operand type mismatch error for
>>this part:
>>
>>oExcel.Cells[nRow, 8].Value <= 3.2".
>>
>>
>>code snippet:
>>
>>FOR nRow = 1 TO  oExcel.ActiveWorkBook.ActiveSheet.UsedRange.Rows.Count
>>      IF (oExcel.Cells[nRow, 2].Value = "eseti" AND oExcel.Cells[nRow, 8].Value <= 3.2)
>>       	    oExcel.Cells[nRow, 2].Interior.Color = RGB(255,153,255)
>>      ENDIF
>>ENDFOR
>>
>>
>>Can anyone help?
>
>With Excel, you often can't be sure how will it interpret a text in the cell. I've seen unexpected things when accessing .value via COM - for instance, strings like "3-4" or "4/5" may be taken as dates, "75%" actually contains 0.75 (which is actually correct, but unexpected) etc. See my rant at It is not a formula, you moron.
>
>I've come to trust cell(..).text more. At least I can interpret that closer to the semantics of the data, than Excel can.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform