Java read excel file report Duplicate PageSettingsBlock record (sid=0x29) error

< H1 > question < / H1 >

poi reports an Duplicate PageSettingsBlock record exception when reading the xls file exported by the company"s reporting system.

org.apache.poi.hssf.record.RecordFormatException: Duplicate PageSettingsBlock record (sid=0x29)

    at org.apache.poi.hssf.record.aggregates.PageSettingsBlock.checkNotPresent(PageSettingsBlock.java:224)
    at org.apache.poi.hssf.record.aggregates.PageSettingsBlock.readARecord(PageSettingsBlock.java:189)
    at org.apache.poi.hssf.record.aggregates.PageSettingsBlock.addLateRecords(PageSettingsBlock.java:636)
    at org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:191)
    at org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:127)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:291)
    at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:88)

then save the file as below and you can read it.
Source xls file is not convenient to upload.

Feb.28,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36bb3-2c033.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36bb3-2c033.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?