You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by swatik_2000 <sw...@yahoo.co.uk> on 2011/02/09 10:10:05 UTC
Are data validations applicable on copying data
Hello,
I am fairly new to apache POI. I have been using it to create an excel Sheet
that can be downloaded by a user and filled with data. The sheet gets
generated dynamically, when the user attempts to download it, with data
validations for cell ranges based on what needs to be filled in those cells.
Now, the cells that have numeric constraints. show the error message when I
type in a non-numeric value and move out of the cell. However, if, instead
of typing, I were to copy a text from another cell and paste it in the
numeric cell, the data validation is not triggered. If a delete this copied
value and type in text again, the error message is triggered again.
Are data validations rendered invalid when data is pasted on to a cell? If,
yes, is there any way by which I can retain the validations even after a
copy-paste?
Regards
Swati
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Are-data-validations-applicable-on-copying-data-tp3377250p3377250.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Are data validations applicable on copying data
Posted by Deepak Maheshwari <ma...@gmail.com>.
Hi,
I am new POI, I have created an excel template and I am writing data in
that tempate dyanamically from the server and it is getting downloaded
properly. Also I am creating drop down values using HSSFDataValidation, I am
putting formula in that so that I can have maximum data in that dropdown as
POI has limitaion for 255 string literals.
I am facing issue when I re-downloads file......suppose I have downloaded a
template and after some time template formula changes (changed in web site
by user as it is dynamic file) so it is not overriting that formula. (It is
kind of caching done by excel)..instead I need to remove that formula
manuallly (Data Validation>Seeting>List>Source>Clear All).
Can you please help me out from this.
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Are-data-validations-applicable-on-copying-data-tp3377250p3397180.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Are data validations applicable on copying data
Posted by Mark Beardsley <ma...@tiscali.co.uk>.
Nearly. All POI can do is edit or create files that Excel can read. It can
have no influence at all over the way Excel behaves other than to determine
which cell something appears in, what font is used, what the colour of the
cell is, etc. This is all information that is encoded into the file, Excel
then parses that file, interprets the instructions it contains and displays
the contents in an appropriate manner.
This list is the place to ask questions such as 'When I am creating the file
with POI, I need to ensure that the background of the cell is read. How can
I do this?' It might be that someone on the list does know the answer to an
Excel related question but you might have to wait a while until they are
viewing the list. If you can find an Excel users forum, it is far more
likely that you will receive a prompt answer to such questions.
Hope that helps, good luck with the project and we are always here to help
with POI 'stuff'.
Yours
Mark B
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Are-data-validations-applicable-on-copying-data-tp3377250p3379199.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Are data validations applicable on copying data
Posted by swatik_2000 <sw...@yahoo.co.uk>.
Oh, ok I get it.
POI is a way stimulate inherent behaviour in Excel externally. So, what you
are saying is that, the way excel behaves, irrespective of how the file was
created, is entirely related to Excel.
Thanks for putting me on the right track.
Regards,
Swati.
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Are-data-validations-applicable-on-copying-data-tp3377250p3379045.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Are data validations applicable on copying data
Posted by Mark Beardsley <ma...@tiscali.co.uk>.
This is not really a POI question as you are asking what happens when you
interact with Excel, rather than how to use POI to create/edit a file. The
best place to ask questions like these is an Excel user forum. You may be
lucky and find an answer by seraching ozgrid, there are LOTS of helpful
hints and tips for Excel users there.
Yours
Mark B
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Are-data-validations-applicable-on-copying-data-tp3377250p3377965.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org