Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE automation Excel - how to handle spaces?
Message
From
10/07/1998 03:40:05
Arnold Lee
K&A International Co.,Ltd
Hong Kong, Hong Kong
 
 
To
29/05/1998 02:53:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00102943
Message ID:
00116020
Views:
26
>>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

Carlos,

Your explaination is great.
But if I want to pass parameter from VFP to Excel in array format,like ARRAY("Sheet1","Sheet2"),how can I do that ?
I had try using your suggestion but doesn't work,would you pls give me any advise about that

Thanks in advance
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform