From b63080e7c48eab1c98f2d8368b8948226d5c3711 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Mon, 17 Mar 2014 19:02:21 +0000 Subject: [PATCH] Fix bug #56278 - Support loading .xlsx files with no Styles Table git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1578518 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/xssf/usermodel/XSSFWorkbook.java | 7 ++++++- .../apache/poi/xssf/usermodel/TestXSSFBugs.java | 15 +++++++++++++++ test-data/spreadsheet/56278.xlsx | Bin 0 -> 7774 bytes 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 test-data/spreadsheet/56278.xlsx diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java index 5018c71ea3..2955300e42 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java @@ -295,10 +295,15 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Iterable27JHL%N%x8ziMe1f;t=1SAEdB$bpdX$0v`>8_z0?!dXYf6KW+S4)N2#1AljY#q47H#@fNc)YQ>|`SF8? z$<^jnf3lwSEDKg}sp_T=H-huDbmC1c)-=^T9*hQ@jZ3-g%TG}j4DhlXmzQ7Cot5g* ziE+i4q1brbsRY~yV`Cb5$8=mLirJ(3WjM@XDj8FIr@GT_>hHbF$?VkAGSV}8yha7< zq9#b{1t-=_R&Mv>R5V{Z7SAtj&6{6K&zFoB5%7-d^y14}7DrMAEXpPJ zPdN2Y5BblWu#+i$5>sG<@=(2$S8$cHAf?=rbzLB#{7P3Ey}&-rc`cf_=wP%vq2;xq zqawY6xD`RVvy)L%R-GWYiKsFDr6Sik?n-n-&_8j$6qmbj%raT!GCBczEz=DGM;YCT zKEg*@)Sc`9_7TfB)umvq>x;vk%DdUYvL_Z{bCi2y`PJGi_o& z{tC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