diff --git a/src/main/java/technology/tabula/extractors/SpreadsheetExtractionAlgorithm.java b/src/main/java/technology/tabula/extractors/SpreadsheetExtractionAlgorithm.java index 5b4af3d5..59ff966e 100644 --- a/src/main/java/technology/tabula/extractors/SpreadsheetExtractionAlgorithm.java +++ b/src/main/java/technology/tabula/extractors/SpreadsheetExtractionAlgorithm.java @@ -62,7 +62,7 @@ else if (r.vertical()) { List cells = findCells(horizontalR, verticalR); List spreadsheetAreas = findSpreadsheetsFromCells(cells); - + List spreadsheets = new ArrayList<>(); for (Rectangle area: spreadsheetAreas) { @@ -183,9 +183,9 @@ public static List findCells(List horizontalRulingLines, List findSpreadsheetsFromCells(List cells) { // via: http://stackoverflow.com/questions/13746284/merging-multiple-adjacent-rectangles-into-one-polygon List rectangles = new ArrayList<>(); - Set pointSet = new HashSet<>(); - Map edgesH = new HashMap<>(); - Map edgesV = new HashMap<>(); + Set pointSet = new LinkedHashSet<>(); + Map edgesH = new LinkedHashMap<>(); + Map edgesV = new LinkedHashMap<>(); int i = 0; cells = new ArrayList<>(new HashSet<>(cells));