Bill,
To get data from spreadsheets quickly I sometimes use the following verbs:
require 'strings'
tabget=:([: <;._2 ,&TAB);....@wdclipread
tabnget=:".@(rplc&'-_')@>@tabget
NB. formats J data in Excel ready form
tabfmt=:3 : 0
if. 0=L. y. do. y.=.<"0 y. end.
'_-' rplc~ >([ , LF"_ , ])each/([ , TAB"_ , ])&": each/"1 y.
)
tabput=:wdclipwr...@tabfmt
You select range in spread sheet, copy it to clipboard, then switch to J and
then say
a=.tabget ''
or
a=.tabnget ''
tabget returns boxed array of strings,
tabnget returns numeric array.
When you need to copy put data in spreadsheet use tabput:
tabput i. 3 4
then switch to spreadsheet and press Ctrl-V
(tabput formats array and puts the formatted result on clipboard)
It works with Excel and Google docs spreadsheet, I am sure other spreadsheets
follow same clipboard convention.
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/196390708/direct/01/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm