protected HeaderFooterBase(RecordInputStream in) {
if (in.remaining() > 0) {
int field_1_footer_len = in.readShort();
+ //61287 -- if the footer_len == 0, there may not be a multibyte flag
+ if (field_1_footer_len == 0) {
+ field_3_text = "";
+ if (in.remaining() == 0) {
+ return;
+ }
+ }
field_2_hasMultibyte = in.readByte() != 0x00;
if (field_2_hasMultibyte) {
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.util.Locale;
import java.util.TimeZone;
-import javax.imageio.ImageIO;
-
import org.apache.poi.EncryptedDocumentException;
import org.apache.poi.hssf.HSSFITestDataProvider;
import org.apache.poi.hssf.HSSFTestDataSamples;
wb.getCreationHelper().createFormulaEvaluator().evaluateAll();
wb.close();
}
+
+ @Test
+ public void test61287() throws IOException {
+ final Workbook wb = HSSFTestDataSamples.openSampleWorkbook("61287.xls");
+ ExcelExtractor ex = new ExcelExtractor((HSSFWorkbook)wb);
+ String text = ex.getText();
+ assertContains(text, "资产负债表");
+ wb.close();
+ }
+
}