diff --git a/src/java/org/apache/poi/ss/format/CellFormatPart.java b/src/java/org/apache/poi/ss/format/CellFormatPart.java index 2c65ca865d..c03dbc5795 100644 --- a/src/java/org/apache/poi/ss/format/CellFormatPart.java +++ b/src/java/org/apache/poi/ss/format/CellFormatPart.java @@ -108,7 +108,7 @@ public class CellFormatPart { static { // A condition specification String condition = "([<>=]=?|!=|<>) # The operator\n" + - " \\s*([0-9]+(?:\\.[0-9]*)?)\\s* # The constant to test against\n"; + " \\s*(-?[0-9]+(?:\\.[0-9]*)?)\\s* # The constant to test against\n"; // A currency symbol / string, in a specific locale String currency = "(\\[\\$.{0,3}-[0-9a-f]{3}\\])"; diff --git a/test-data/spreadsheet/FormatConditionTests.xlsx b/test-data/spreadsheet/FormatConditionTests.xlsx index 22622586f8..432e54630a 100644 Binary files a/test-data/spreadsheet/FormatConditionTests.xlsx and b/test-data/spreadsheet/FormatConditionTests.xlsx differ