They are not the only way to crack the problem. You could pass the patterns as arguments on the command line, you could look at using a resource bundle - althought this is usually a tool brought in to play when the application must be internationlised. Properties are possibly the quickest and easiest way to handle a situation where you need to externalise information that may change and then allow the application to pick this data up whenever it is run. Take a look here;
http://en.wikipedia.org/wiki/.properties http://download.oracle.com/javase/tutorial/essential/environment/properties.html http://download.oracle.com/javase/1.4.2/docs/api/java/util/Properties.html The key to it all is the properties file which simply holds one or more key/value pairs in the following format; key=value Your application will load the properties from a stream into a Properties object which it can then interrogate, passing the key and receiving the associated value back in return. Obviously, it does mean one more file has to accompnay the application but this is not too large a price to pay when you consider the flexibility that the technique offers IMO. Yours Mark B -- View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-check-if-Excel-values-are-matching-with-my-format-tp3379567p3385612.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]
