diff options
author | Dominik Stadler <centic@apache.org> | 2016-04-01 06:25:49 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2016-04-01 06:25:49 +0000 |
commit | 63780176d952875bb5618567f36b3392b8c6684d (patch) | |
tree | 98940d9bce85988615864f6193dc1f51072d1a22 /src/examples | |
parent | 9900929cca98103d35886184df53005297ab302f (diff) | |
download | poi-63780176d952875bb5618567f36b3392b8c6684d.tar.gz poi-63780176d952875bb5618567f36b3392b8c6684d.zip |
Enhance integration tests to call some of the common examples/devtools to also trigger these with all sample files, currently XLSX2CSV, BiffViewer, FromHowTo
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1737308 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/examples')
-rw-r--r-- | src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java b/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java index 8e0007edf2..11d14ae376 100644 --- a/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java +++ b/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java @@ -28,6 +28,7 @@ import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.PackageAccess; import org.apache.poi.ss.usermodel.DataFormatter; +import org.apache.poi.ss.util.CellAddress; import org.apache.poi.ss.util.CellReference; import org.apache.poi.util.SAXHelper; import org.apache.poi.xssf.eventusermodel.XSSFSheetXMLHandler.SheetContentsHandler; @@ -106,7 +107,12 @@ public class XLSX2CSV { } else { output.append(','); } - + + // gracefully handle missing CellRef here in a similar way as XSSFCell does + if(cellReference == null) { + cellReference = new CellAddress(currentRow, currentCol).formatAsString(); + } + // Did we miss any cells? int thisCol = (new CellReference(cellReference)).getCol(); int missedCols = thisCol - currentCol - 1; |