Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel automation - formula
Message
 
À
06/07/2007 14:23:28
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01238295
Message ID:
01238312
Vues:
15
>Thanks for the quick help, but...
>I used this code (from the book):
>
>oExcel.ActiveSheet.Range("C22").Formula = "=SUM(C5:C20)"
>
>
>I tried this:
>
>oExcel.ActiveSheet.Cell(11,22).Formula = "=SUM(K19;K16;K10;K7)"
>
>But I got this error message:
>"OLE error code:0x80020006:Unknown name"(in Hungarian)
>
>I also tried this:
>
>oExcel.ActiveSheet.Range("K22").Formula = "=SUM(K19;K16;K10;K7)"
>
>And I got this error message:
>"OLE error code:0x800a03ec:Unknown COM status code"
>
>It may have sg. to do with the Hungarian version of Ms Excel?
>I gonna check Naomi's links.
>
>Thanks again,
>Tamas
>
>
>>>I tried the command line below borrowed from "Ms Office Automation with VFP" but it wont work. Got OLE error message.
>>>Any help?
>>>
>>>oExcel.ActiveSheet.Range("K:22").Formula = "=SUM(K19;K16;K10;K7)"
>>>
>>
>>Unfortunately I didn't have Excel installed on my home computer, so I can't test but I thik you need something like:
>>
>>oExcel.ActiveSheet.Cell(11,22).Formula = "=SUM(K19;K16;K10;K7)"
>>
>>But again, this is didn't tested.


Tamas,
Try to use COMMA to separate cell addresses in the formula. The delimiter depends of you current Regional settings. I remember once Namoy found a way to ignore them BUT I can't remember how.

P.S. Sorry Naomi, I hate to CC my answers, but because you are involved here I can't resist :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform