Sumit,

Thanks for your reply. I will try this. But I was thinking, would it be 
possible to save an excel template on the server which has the required drop 
down lists. Then when I want to write to the excel, I just open the template 
and set the cell values. I am not sure if this will work. I haven't tried it 
yet. I was just wondering if this could be another solution.

thanks & regards,
Ashlesha 


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 30, 2006 5:19 PM
To: [email protected]
Subject: Re: Drop down list in excel


I think this question has been asked many times earlier.. and I think it 
is not possible thru the available APIs (HSSF) as of now. 

There is a hard way to do it though.. and might NOT be worth the effort.. 
but 

you can create a macro to do this in a template xls and then create 
instances from this template to get the desired results. 

For example if you need a dropdown in C1 column of a sheet called 
"Sheet1". And you know that the dropdown values are located at, lets say 
Sheet2.A2:A10. Then you can write a macro which will triggered at a 
particular event (lets say opening of the workbook), which will first find 
out if there is a dropdown control in Sheet1.C1. If not then it will 
create the control else do nothing. This macro can be at workbook level. 

Regards,
Sumit Machwe




"Natu, Ashlesha [IT]" <[EMAIL PROTECTED]> 
05/30/2006 03:15 PM
Please respond to
"POI Users List" <[email protected]>


To
<[email protected]>
cc

Subject
Drop down list in excel






Hello,
 
I am using Jakarta POI to write to an excel spreadsheet. I need to have a 
drop down list box in a column in the excel sheet (like, Data - validation 
, allow List, if it was to be done manually) . 
 
Is it possible to do this with POI?
 
thanks & regards,
Ashlesha Natu
(908)563-0802
 




+=========================================================+
This message may contain confidential and/or privileged
information.  If you are not the addressee or authorized to
receive this for the addressee, you must not use, copy,
disclose or take any action based on this message or any
information herein.  If you have received this message in
error, please advise the sender immediately by reply e-mail
and delete this message.  Thank you for your cooperation.
+=========================================================+

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to