diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-11-25 12:49:21 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-11-25 12:49:21 +0000 |
commit | 9ed220fd759593d8984ba5cfecdeaac670059117 (patch) | |
tree | 67adc3f144cf594f68eaaf13ac5a4148cc00ba51 /poi-examples/src | |
parent | 1896253fb5715ca6b3933a1d3f2f8cdb3b273c2e (diff) | |
download | poi-9ed220fd759593d8984ba5cfecdeaac670059117.tar.gz poi-9ed220fd759593d8984ba5cfecdeaac670059117.zip |
[bug-65703] new DataFormatter method: setUse4DigitYearsInAllDateFormats - defaults to false
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895327 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples/src')
-rw-r--r-- | poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java index 77a1b113e8..84885b48d3 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java @@ -201,7 +201,9 @@ public class XLSX2CSV { SharedStrings strings, SheetContentsHandler sheetHandler, InputStream sheetInputStream) throws IOException, SAXException { - //set emulateCSV=true on DataFormatter - it is also possible to provide a Locale + // set emulateCSV=true on DataFormatter - it is also possible to provide a Locale + // when POI 5.2.0 is released, you can call formatter.setUse4DigitYearsInAllDateFormats(true) + // to ensure all dates are formatted with 4 digit years DataFormatter formatter = new DataFormatter(true); InputSource sheetSource = new InputSource(sheetInputStream); try { |