Live integration between APL ARRAY and EXCEL Sheet
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
13 posts
• Page 2 of 2 • 1, 2
Re: Live integration between APL ARRAY and EXCEL Sheet
Hi Charles! Could you be falling prey to the same problem that Woodley had - of a non-default value for ⎕WX? The value should be 3. Without this, you need to treat Range as a function rather than an indexable property, and write:
The ⎕NC-vs-⎕NL behaviour is related to the fact that Dyalog APL wraps all external objects in a "regular" APL namespace. You can inject your own names into this wrapper, and then ⎕NC will report them - but it will only see the "normal" APL names:
The negative argument to ⎕NL alters the behaviour in two ways: You get a vector of vectors back, AND it also includes names exposed by the underlying external object (not you ALSO see XYZ in the result):
If you provide ⎕NC with a nested right argument, you will see the names exposed by the underlying object, and also get a more granular result with sub-classification of the names:
More about this in the help for ⎕NC and ⎕NL.
- Code: Select all
range←XL.ActiveSheet.Range 'A1:D3'
The ⎕NC-vs-⎕NL behaviour is related to the fact that Dyalog APL wraps all external objects in a "regular" APL namespace. You can inject your own names into this wrapper, and then ⎕NC will report them - but it will only see the "normal" APL names:
- Code: Select all
'XL' ⎕WC 'OLECLient' 'Excel.Application' ⍝ Create a an OLE Client
XL.XYZ←1234
XL.⎕NL 2
XYZ
XL.⎕NC 'XYZ'
2
The negative argument to ⎕NL alters the behaviour in two ways: You get a vector of vectors back, AND it also includes names exposed by the underlying external object (not you ALSO see XYZ in the result):
- Code: Select all
¯6↑XL.⎕NL -2
WindowsForPens Workbooks WorksheetFunction Worksheets XYZ _Default
If you provide ⎕NC with a nested right argument, you will see the names exposed by the underlying object, and also get a more granular result with sub-classification of the names:
- Code: Select all
XL.⎕NC 'CentimetersToPoints' 'ActiveSheet'
¯3.6 ¯2.6
More about this in the help for ⎕NC and ⎕NL.
-
Morten|Dyalog - Posts: 394
- Joined: Tue Sep 09, 2008 3:52 pm
Re: Live integration between APL ARRAY and EXCEL Sheet
Hi Morton,
Thanks. I thought I'd checked ⎕WX←3 but since I'm now successful with SaveXL I must've thought wrong.
But the Excel object isn't visible to me. I see a slew of names & functions in Workbook but nothing tempting hits my eye. Can you tell me where to look?
Thanks,
Charles
Thanks. I thought I'd checked ⎕WX←3 but since I'm now successful with SaveXL I must've thought wrong.
But the Excel object isn't visible to me. I see a slew of names & functions in Workbook but nothing tempting hits my eye. Can you tell me where to look?
Thanks,
Charles
- Charles Brenner
- Posts: 2
- Joined: Mon Mar 23, 2020 4:09 am
Re: Live integration between APL ARRAY and EXCEL Sheet
Try (XL.Visible←1) to make Excel show itself?
-
Morten|Dyalog - Posts: 394
- Joined: Tue Sep 09, 2008 3:52 pm
13 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group