Automating scripts in q/kdb

563 Views Asked by At

I have some codes in kdb+(which uses q) which generates data in tabular form. The problem is I need to run each line separately and export the data to excel. Is there any way to automate this such that all the excel files can ben generated in one go? Thanks

1

There are 1 best solutions below

2
On BEST ANSWER

Whils't you can of course use csv as suggested above, .h.edsn is the function used for creating excel workbooks. It takes a dictionary of sheetNames->tables.

`:/var/tmp/excel.xls 0: .h.edsn `tab1`tab2!(([]10?10);([]20?20))

Then just open the xls file in excel.