The general approach to create an Excel file is:
w = Workbook()
ws = w.add_sheet('My sheet name')
ws.write(row, cell, <item>)
So you just iterate over all the Numpy array entries, writing them one
at a time to the Excel file. I posted an example previously and the
code is here: http://pastebin.com/f5ea0b737 (use the bottom half of
the page to copy and paste from). This also handles arrays of more
than 65536 rows or 256 columns by creating additional Excel sheets;
basically it just tiles the Numpy array.
Regarding dates: take a look at the example here:
https://secure.simplistix.co.uk/svn/xlwt/trunk/xlwt/examples/dates.py
Now the syntax just adds an extra parameter: ws.write(row, cell,
<item>, <style>). See the example for what <item> and <style> are.
Kevin
Hi Timmie,
> does xlwt have a functionality to read a numpy array into a Excel
> table?
No, and it won't, on the principle that it is better to have M readers +
N writers than M * N copiers. The "for" statement is your friend :-)
Cheers,
John