I want to create an excel, which should have cell with multi-select dropdown.
e.g. if a cell is given options = [a", "b", "c", "d", "e"]. Editor selects "a", then the value in cell should be "a". In the subsequent selection for the same cell, if the editor selects "b", the final value in the cell should be "a,b".
I am able to create a drop-down list using xlsxwriter
package using below sample code. But it does not support multiselect.
import xlsxwriter
workbook = xlsxwriter.Workbook('data_validate.xlsx')
worksheet = workbook.add_worksheet()
worksheet.write('A13', txt)
worksheet.data_validation('B13', {'validate':'list',
'source': ['open', "high", 'close']})
workbook.close()
This is an example take from xlsxwriter
documentation.
I went through other libraries such as xlrd
, xlwt
, PyXLL
and a few others, but could not find anything which could support multiselect or provide a work around to achieve the same.
Is there any inbuilt library, or way to achieve this in excel. I don't want to use any windows and VB dependency.
Any help would be really appreciated.