aboutsummaryrefslogtreecommitdiffstats
path: root/poi/src
diff options
context:
space:
mode:
Diffstat (limited to 'poi/src')
-rw-r--r--poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java b/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java
index b8bd933a9a..ed3a447aab 100644
--- a/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java
+++ b/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java
@@ -606,7 +606,10 @@ public class DataFormatter {
}
- private String cleanFormatForNumber(String formatStr) {
+ private String cleanFormatForNumber(String formatStrIn) {
+ // this replace is done to fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63211
+ String formatStr = formatStrIn.replace("\\%", "\'%\'");
+
StringBuilder sb = new StringBuilder(formatStr);
if (emulateCSV) {