https://bz.apache.org/bugzilla/show_bug.cgi?id=63960

            Bug ID: 63960
           Summary: Pre-evaluated values in formula cells are written with
                    the wrong type
           Product: POI
           Version: 4.1.1-FINAL
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

A pre-evaluated value in a Formula cell is written by SheetDataWriter as
follows:

    switch(cell.getCachedFormulaResultType()) {
        case NUMERIC:
            writeAttribute("t", "n");
            break;
        case STRING:
            writeAttribute("t", STCellType.S.toString());
            break;
        case BOOLEAN:
            writeAttribute("t", "b");
            break;
        case ERROR:
            writeAttribute("t", "e");
            break;
    }

The problem is that STCellType.S is for shared strings, but then the value is
immediately written with <v></v> for an inline string. The correct cell type in
this situation is "str", not "s".

This causes Excel to mark the sheet as invalid when opening.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to