You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2021/11/25 12:49:21 UTC
svn commit: r1895327 - /poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java
Author: fanningpj
Date: Thu Nov 25 12:49:21 2021
New Revision: 1895327
URL: http://svn.apache.org/viewvc?rev=1895327&view=rev
Log:
[bug-65703] new DataFormatter method: setUse4DigitYearsInAllDateFormats - defaults to false
Modified:
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java
Modified: poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java?rev=1895327&r1=1895326&r2=1895327&view=diff
==============================================================================
--- poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java (original)
+++ poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java Thu Nov 25 12:49:21 2021
@@ -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 {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org