From 057a85ac1e599c763acdc769dcc9da2f705f3110 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Thu, 25 Nov 2021 06:46:04 +0000 Subject: set emulateCSV mode in DataFormatter git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895315 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 c411e13ba7..77a1b113e8 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,8 @@ public class XLSX2CSV { SharedStrings strings, SheetContentsHandler sheetHandler, InputStream sheetInputStream) throws IOException, SAXException { - DataFormatter formatter = new DataFormatter(); + //set emulateCSV=true on DataFormatter - it is also possible to provide a Locale + DataFormatter formatter = new DataFormatter(true); InputSource sheetSource = new InputSource(sheetInputStream); try { XMLReader sheetParser = XMLHelper.newXMLReader(); -- cgit v1.2.3