Closed ivanionut closed 2 years ago
Hi, I'll take a look. Can you give me a bit more detail on how you might use it?
hi Julian, what I want to do are "simple" drop-downs list within a cell or column.
Hi Ivan
I've added support for data validations to the develop branch. Could you please download and test it?
Basic usage is as follows:
myWorkbook = spreadsheet.newXlsx();
spreadsheet.newDataValidation()
.onCells( "A1:C1" )
.withValues( [ "New York", "London", "Paris" ] ) //an array of valid values
.addToWorkbook( myWorkbook );
Pulling the values from other cells in the workbook is also supported:
myWorkbook = spreadsheet.newXlsx();
spreadsheet.newDataValidation()
.onCells( "A1:C1" )
.withValuesFromSheetName( "cities" )
.withValuesFromCells( "A1:A3" )
.addToWorkbook( myWorkbook );
I'll create full documentation on release but meantime the tests provide a bit more detail.
Please let me know if you find any problems or have questions.
@cfsimplicity wow, thanks! it works very well!
OK, great. I'll cut a new release soon.
hi, is it possible to implement this class in spreadsheet-cfml to have the ability to generate dropdown?
thanks, Ivan