I believe that there are a collection of csv related utilities in addons
( require 'csv' will make those available to you).
However, for years I have used a simplistic verb to bring .csv files
into a j session as a table of enclosed values -
cutl =: 3 : 0
:
y =. y,x
q =. y e.'"'
qs =. ~:/\q
}.^: ('"'&=@([:{.1:{.]))&.> (qs<y e.x) <;._2&((q<:qs)&#) y
)
tablecsv =: 3 : 0
',' tablecsv y NB. allows choosing an alternative delimiter
:
x &cutl;._2 y
)
On 2012/01/02 09:22 , Tom Szczesny wrote:
> Some languages, like q, have a built-in command for reading, parsing, and
> loading data from csv files:
> t: ("SSDIDSSIFFFIS";enlist ",") 0: `:/home/tom/t.csv
>
> Other languages, like a+, do not, and the user needs to write a function to
> read, parse and load data from csv files.
>
> > From a cursory review, it appears that j is in the a+ camp.
> Please confirm that such a facility does not exist in j, before I start
> writing my own.
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm