On Wed, 22 Jul 2009, Henry Rich wrote:
> I can bring up the tables\excel addon and read blocks of cells.
> 
> Now I want to set the value of a cell or block of cells.
> 
> Can anyone show me how to do this, or point to some reference that 
> discusses what the OLE commands to Excel are?
> 
> I tried
> 
> wd 'oleinfo xl;'
> 
> xl is the name of the child control created by tables\excel: the sequence is
> 
> wd 'cc xl oleautomation:excel.application'
> T__ =: wd 'oleinfo xl;'
> 
> but it fails, giving
> 
>     wd 'qer'
> bad child class : 0
> 
> Is oleinfo still supported?
> 
> I just can't find any way to get started writing a cell.


This should get you starting, 

  wd 'oleget me aws range B3'
  wd 'oleid me range'
  if. 0=#string do.
    wd 'olemethod me range clearcontents'
  else.
    wd 'oleset me range numberformat *@'
    wd 'oleset me range value *', string 
  end. 

IIRC for writing a block of cells, replacing "B3" with format "B3:E5" and
string be a TAB/LF delimited clipboard formatted string.

-- 
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