This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Apache POI- HSSFDataValidation Formula Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Apache POI- HSSFDataValidation Formula Validation " Watch "Apache POI- HSSFDataValidation Formula Validation " New topic

Apache POI- HSSFDataValidation Formula Validation

Mamatha Kv

Joined: Apr 01, 2010
Posts: 5

I have been looking HSSFDataValidation and was able to run the sample below.

My requirement is I need to apply this formula for Entire column to achieve the need like

When user enters data in col2 (B) of greater than the number specified in col1 (A) and then show the ErrorBox.

I am able to get the formula working through code only for first cell as per below code... I want it to dynamically apply for the entire column.

Please suggest...

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39576
A couple hints on how to make it easier for others to help you:

Please UseCodeTags when posting code of any length (I have added those now for you). It's unnecessarily hard to read the code otherwise, making it less likely that people will do so.

Also, you can make it much easier on others by posting an SSCCE - that means including all necessary imports. If people have to figure those out by themselves, it's much less likely they will bother to do so. You can edit your post to add the imports by using the button.

Ping & DNS - updated with new look and Ping home screen widget
I agree. Here's the link:
subject: Apache POI- HSSFDataValidation Formula Validation
Similar Threads
root cause of problem ,why 2003 excel cell background color is not reflecting in orginal document
facing diffculty to highlight background color of an excel cell which is not reflected in file
how to store a file in the local hard disk
How to make POI HSSF support Chinese Encoding?
opening the excel sheet from servlet