rdkit/rdkit — pull request #371 by samoturk (2014-10-30 15:46:34+00:00)
Title: added SaveXlsxFromFrame - first version

Added a function that saves pandas DataFrame as a xlsx file with embedded images.
It maps numpy data types to excel cell types:
* int, float -> number
* datetime -> datetime
* object -> string (limited to 32k character - xlsx limitations)

Due to xlsxwriter limitations (other python xlsx writers have the same problem) temporary image files have to be written to the hard drive.

Cells with compound images are a bit larger than images due to excel. Column width weirdness explained (from [xlsxwriter](http://xlsxwriter.readthedocs.org/en/latest/worksheet.html) docs): "The width corresponds to the column width value that is specified in Excel. It is approximately equal to the length of a string in the default font of Calibri 11. Unfortunately, there is no way to specify “AutoFit” for a column in the Excel file format. This feature is only available at runtime from within Excel."

It crashes if value of a cell is of wrong type so use df['value'].astype() to fix incorrectly assigned types.

Resulting files work nicely in Office 365 (standalone and web app), but for some reason don't work optimally with LibreOffice (after row ~125 it stacks all images).