Can anyone point us in the right direction on this one? Sounds lihe stopper is understanding the "criteria". Anyone know where this may be documented?
-----Original Message----- From: James, Randy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 10:18 AM To: '[EMAIL PROTECTED]' Subject: Data Validation with POI Warning, this is a long message.... I am trying to contribute data validation functionality to the project. I have successfully created(I think) the Record types for the DV and DVAL BIFF8 records. I have hit a snag though. Using BiffViewer I analyze a spreadsheet that I put a drop down list into(using Excel). The problem is that BiffViewer returns me the data from the DV records, but I am unsure on how to interpret this. For example, the fillFields method in my DV code is: protected void fillFields(byte [] data, short size, int offset) { field_1_option_flags = LittleEndian.getShort(data, 0 + offset); field_2_validation_criteria = new IntList((short)100); // initial capacity of 100 /*44 is the max here for some reason. The record size always seems to be 47, however when I use size as the max I get an array out of bounds exception from LittleEndian.getNumber().*/ for (int k = 4; k < 44; k = k + 4) { field_2_validation_criteria.add(LittleEndian.getInt(data, k + offset)); } } ----------------------- The toString in my class looks like: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("[DV]\n"); buffer.append(" .optionFlags = ") .append(Integer.toHexString(getOptionFlags())).append("\n"); for (int k = 0; k < getNumCriteria(); k++) { buffer.append(" .criteria_" + k + " = ") .append(Integer.toHexString(getCriteriaAt(k))).append("\n"); } buffer.append(" .validationType = ") .append(Integer.toHexString(getValidationType())).append("\n"); buffer.append(" .errorStyle = ") .append(Integer.toHexString(getErrorStyle())).append("\n"); buffer.append(" .strLookup= ").append(getStrLookup()) .append("\n"); buffer.append(" .allowBlank = ").append(getAllowBlank()) .append("\n"); buffer.append(" .supressCombo = ").append(getSuppressCombo()) .append("\n"); buffer.append(" .imeMode = ") .append(Integer.toHexString(getImeMode())).append("\n"); buffer.append(" .showInputMessage = ").append(getShowInputMessage()) .append("\n"); buffer.append(" .showErrorMessage = ").append(getShowErrorMessage()) .append("\n"); buffer.append(" .operatorType = ") .append(Integer.toHexString(getOperatorType())).append("\n"); buffer.append("[/DV]\n"); return buffer.toString(); } -------------------------------- OK, with that said, here is the output from BiffViewer: [DV] .optionFlags = 103 .criteria_0 = 1 .criteria_1 = 1 .criteria_2 = 1 .criteria_3 = 1 .criteria_4 = c0009 .criteria_5 = 3000125 .criteria_6 = 9000900 .criteria_7 = 0 .criteria_8 = 101 .criteria_9 = 0 .validationType = 3 .errorStyle = 0 .strLookup= false .allowBlank = true .supressCombo = false .imeMode = 0 .showInputMessage = false .showErrorMessage = false .operatorType = 0 [/DV] Finally, here's my question. For each of the criteria_x, where might I find what each one is? In the Excel 97 Dev kit , page 305 it says "Array of validation criteria(see text)". Maybe I am missing something, but "see text" does not point me to what to see. Am I missing something here? Seems like there should be a list of what the criterias can be.... Hopefully this is the correct forum to ask these questions. I apologize for the length of this message. Any help is much appreciated! Randy James
