Based upon
http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java

I have a modified case FormulaRecord.sid:

                case FormulaRecord.sid:
                        FormulaRecord frec = (FormulaRecord) record;

                        thisRow = frec.getRow();
                        thisColumn = frec.getColumn();

                                if(Double.isNaN( frec.getValue() )) {
                                        // Formula result is a string
                                        // This is stored in the next record
                                        outputNextStringRecord = true;
                                        nextRow = frec.getRow();
                                        nextColumn = frec.getColumn();
                                } else {
                                        thisStr = 
formatListener.formatNumberDateCell(frec);
                                }


I was expecting to be able to get the result of a formula (One example I
have a CONCATENATE() statement, but I end up getting a value like "0.00" or
in another column I expect an error message like: #DIV/0! but instead get
"0"Thoughts on how I can get this to match up with the XSSF?

Thanks,

Eric


- XLSStreamReader - Values *** FAILED ***
  Vector(Vector(text_value1, formatted_value1, TRUE, 8/7/12, 5:01:01 AM,
8/7/12 5:01, 1, 1.10, 0.00, 0, sharedstrings_value), Vector(,
formatted_value2, FALSE, 8/8/12, 5:02:02 AM, 8/8/12 5:02, 2, 2.20, 0.00, 0,
sharedstrings_value), Vector(text_value3, formatted_value3, TRUE, 8/9/12,
5:03:03 AM, 8/9/12 5:03, 3, 3.30, 0.00, 0), Vector(text_value4,
formatted_value4, FALSE, 8/10/12, 5:04:04 AM, 8/10/12 5:04, 4, 4.40, 0.00,
0, sharedstrings_value), Vector(text_value5, formatted_value5, TRUE, ,
5:05:05 AM, 8/11/12 5:05, 5, 5.50, 0.00, 0, sharedstrings_value),
Vector(text_value6, formatted_value6, FALSE, 8/12/12, 5:06:06 AM, 8/12/12
5:06, 6, 6.60, 0.00, 0, sharedstrings_value)) did not equal
Vector(Vector(text_value1, formatted_value1, TRUE, 8/7/12, 5:01:01 AM,
8/7/12 5:01, 1, 1.10, 11.1whee, #DIV/0!, sharedstrings_value), Vector(,
formatted_value2, FALSE, 8/8/12, 5:02:02 AM, 8/8/12 5:02, 2, 2.20,
22.2whee, #DIV/0!, sharedstrings_value), Vector(text_value3,
formatted_value3, TRUE, 8/9/12, 5:03:03 AM, 8/9/12 5:03, 3, 3.30, 33.3whee,
#DIV/0!, ), Vector(text_value4, formatted_value4, FALSE, 8/10/12, 5:04:04
AM, 8/10/12 5:04, 4, 4.40, 44.4whee, #DIV/0!, sharedstrings_value),
Vector(text_value5, formatted_value5, TRUE, , 5:05:05 AM, 8/11/12 5:05, 5,
5.50, 55.5whee, #DIV/0!, sharedstrings_value), Vector(text_value6,
formatted_value6, FALSE, 8/12/12, 5:06:06 AM, 8/12/12 5:06, 6, 6.60,
66.6whee, #DIV/0!, sharedstrings_value)) (TestXLSStreamReader.scala:21)

Reply via email to