I like Raul's and Joe's approaches better than the one I proposed. However
I might modify, say Joe's version, to add some formatting like this:
buildTable =: 3 : 0
cols =. ,"2 ('<td>'&,@]@,&'</td>') every y
rows =. , TAB,"1 LF,~"1('<tr>'&,@]@,&'</tr>')"1 cols
table =. '<table>',LF,rows,'</table>'
)
So (this probably won't survive gmail formatting but you can try it
yourself):
buildTable data
<table>
<tr><td>abc</td><td>ab</td> <td>xyz</td><td>abc</td></tr>
<tr><td>ab</td> <td>xyz</td><td>abc</td><td>ab</td> </tr>
<tr><td>xyz</td><td>abc</td><td>ab</td> <td>xyz</td></tr>
</table>
On Tue, Mar 3, 2015 at 11:12 AM, Joe Bogner <[email protected]> wrote:
> How about something like this?
>
> NB. some data that is slightly offset
> data=. 3 4 $ ;: 'abc ab xyz'
>
> buildTable =: 3 : 0
> cols =. ('<td>'&,@]@,&'</td>') every y
> rows =. , ('<tr>'&,@]@,&'</tr>')"2 cols
> table =. '<table>',rows,'</table>'
> )
>
> buildTable data
>
> On Tue, Mar 3, 2015 at 9:40 AM, Chernin, Nadav <[email protected]>
> wrote:
>
> > Hi,
> > I need in my project to represent boxed data in html report
> > I try to find some code that can help me to do that
> > Thanks
> >
> > Nadav Chernin
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
Devon McCormick, CFA
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm