From 8d0b9df2ac3b3dec0717ce23e4f8de3a559c7950 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Sat, 19 Jul 2014 10:09:00 +0000 Subject: [PATCH] Turns out that .xlsx files can have multiple link tables, add a test file which shows this (support to follow) git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1611878 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/xssf/model/TestExternalLinksTable.java | 7 +++++++ test-data/spreadsheet/ref2-56737.xlsx | Bin 0 -> 11474 bytes 2 files changed, 7 insertions(+) create mode 100644 test-data/spreadsheet/ref2-56737.xlsx diff --git a/src/ooxml/testcases/org/apache/poi/xssf/model/TestExternalLinksTable.java b/src/ooxml/testcases/org/apache/poi/xssf/model/TestExternalLinksTable.java index b2c9aff148..612924ad5f 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/model/TestExternalLinksTable.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/model/TestExternalLinksTable.java @@ -81,4 +81,11 @@ public final class TestExternalLinksTable { assertEquals("Defines", name.getSheetName()); assertEquals("$A$1", name.getRefersToFormula()); } + + @Test + public void readWithReferencesToTwoExternalBooks() { + XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("ref2-56737.xlsx"); + + // TODO Fix so we can see both of them... + } } diff --git a/test-data/spreadsheet/ref2-56737.xlsx b/test-data/spreadsheet/ref2-56737.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..bd21fe8c01636a3105544d6e2c015c561237ab89 GIT binary patch literal 11474 zcmeHtby$>ZyYJAQ(%qmm42^Un(%mt1gEUCDg0wJ{lp-}EAp_DN2uLd+-4X-Ry+_yj zj%%^p`|NYB^Ut~V_x>^OHS^B%yWZ!1?)!JAhAI*=5dal{4gdh?0qCD9dovLL02MR< z;0^#C(OA~a)f?pMZLZ_*4)QYP@^f*fdx4C|RscYR|Nr0D|6mCWq>nu8;30~JsRhN9 zG(;2g@b>UDO11E*Fi1$b;8hel<>ZC$9p~XNrP5(}#LZPq1)Sf^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