Yes, it should be quite a trivial task. Obviously, I do not know how the data
is structured in your database but it should be possible to get the data for
all of the drop downs and store it into a series of List(s); one List for
each drop down. Next, create a named area from each list on the workbook
and, finally, create the drop-down list(s) based on each named area. Excel -
unlike OpenOffice which is why I cannot post a working example - allows you
to set the scope for a named area. Setting the scope to Workbook means that
an area defined in one sheet can be referenced in another. So, the data for
your drop-downs can be written into a separate sheet in the workbook which
can then be hidden so that the user need never know about it. By far the
best approach - to my mind at least - is to use the INDIRECT() function to
refer to a named area when creating a drop down. Imagine you have a named
area on a sheet in your workbook with the name of DATA. To use this in a
drop down, all you need to do is create a formula list constraint with the
function INDIRECT(DATA).

The code you posted that made use of a multi-row CellRangeAddressList object
would result in a drop-down list being created in each of the cells in the
range. So, again to use your example, one of the cell in rows 2 to 52 would
have a drop-down list in it. The drop-down in each cell will be identical.
Is this what you are seeking to create?

--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/ERROR-String-literals-in-formulas-can-t-be-bigger-than-255-characters-ASCII-tp5507262p5508394.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to