Programmatically creating XLS with a dropdown cell in Python

I am currently creating XLS files programmatically using the Python and XLWT/XLRD .

I was able to fill cells with values ​​and insert simple formulas. My task is that I want to create a drop-down list for my users ( http://office.microsoft.com/en-us/excel-help/create-or-remove-a-drop-down-list-HP005202215. aspx )

Yes, I can easily do this in EXCEL, but I need to automate this process - I use Python and XLWT/XLRD - I would prefer to use them, but I will switch to something else if necessary (I'm on a Linux Ubuntu server).

+4
source share
4 answers

Short answer: you can not - XLWT / XLRD are not supported.

+2
source

openpyxl also supports drop-down cells in XLSX files with data validation: http://openpyxl.readthedocs.org/en/latest/validation.html

+5
source
+3
source

It is best to go through COM.

http://oreilly.com/catalog/pythonwin32/chapter/ch12.html

From there you have all the options available to you in Visual Basic Visual Basic - including (at least) the ability to send clicks and keystrokes to various objects in a window.

-1
source

All Articles