If you want to select a range, just use the select method on the range
object

wd 'me myrange select'

if you want to paste clipboard into range, just paste into range should be ok.

wd 'me myrange pastespecial'

a more complete example.

f1=: 3 : 0
wd 'clipcopy *', toJ clipfmt 50000 26$'abc';1.23;123
(wd ::0:) 'psel xlauto;pclose'
wd 'pc xlauto'
wd 'cc me oleautomation:excel.application'
wd 'oleget me base workbooks;oleid me wb'
wd 'olemethod me wb open *', '/home/bill/test.xls'
wd 'oleget me base activeworkbook;oleid me awb'
wd 'oleget me awb activesheet;oleid me aws'
wd 'oleget me aws range a1:z50000'
wd 'olemethod me temp select'
wd 'olemethod me temp pastespecial'
wd 'olemethod me awb save'
wd 'olemethod me awb close'
wd 'olemethod me base quit'
wd 'pclose'
)

There is no need to use j macro to read or write excel files from J.  m$ finally
knew it is a security problem to enable vba inside excel/word and it will give
you enough warning if you want to turn it on.


On Thu, 23 Jul 2009, Henry Rich wrote:
> I can create a Range object but I cannot write clipboard data to 
> multiple cells by setting the Value of the Range object to a clipfmt-ed 
> string.  All the cells get set to the vaule of the entire string.
> 
> What worked was creating a Range, then Select it, then Paste.
> 
> I don't have any vb that I know of.  Shouldn't
> 
> wd 'oleinfo'
> 
> tell something about the available methods and properties?  I can't get 
> that to work at all for Excel.
> 
> Henry Rich
> 
> bill lam wrote:
> > On Thu, 23 Jul 2009, Henry Rich wrote:
> >> I finally found
> >>
> >> http://msdn.microsoft.com/en-us/library/aa272302(office.11).aspx
> >>
> >> which lists the methods etc.  But the methods under the letter S seem to 
> >> be missing some.  In particular, Select is not shown.  Does anybody have 
> >> a pointer to a complete list?
> > 
> > iirc the range object is already sufficient to select cell or block of
> > cells. Or you meant the active cell?  In the past I use the object
> > inspector in vb (not vb.net) to browse those methods or properties.
> > There should be similar facility in vs express but I might wrong.
> > 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to