Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE automation Excel - how to handle spaces?
Message
De
29/05/1998 02:53:31
 
 
À
28/05/1998 20:00:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00102943
Message ID:
00102992
Vues:
40
>There are some commands I don't know how to handle using OLE automation in Excel.
>
>Recording a macro is a fast way to get syntax, but here's what I get when I name a range:
>
>ActiveWorkbook.Names.Add Name:="testing", RefersToR1C1:="=Sheet1!R1C1:R1C3"
>
>The "Add Name" includes a space and FoxPro doesn't like the space. Maybe I'm overlooking something simple, but how do you send that command from FoxPro?
>
>Randy Robinson

When copying from a macro, you must ignore the titles of the parameters
Try this, it works fine:

myobj_excel.Workbooks(1).Names.Add("testing", "=sheet1!R1C1:R3C3")

Hope this helps
Saludos,
A.G.P.
---------
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform