Using JDK 1.8.0_92 import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; public class Main { public static void main(String[] args) throws IOException, InvalidFormatException { try (FileInputStream is = new FileInputStream(args[0]); Workbook wb = WorkbookFactory.create(is); FileOutputStream os = new FileOutputStream(File.createTempFile("test", "excel"))) { wb.write(os); } } } Not working XLS https://drive.google.com/open?id=0B3S4vhAbS0W2NHYwZUtwMXI4bkk Working XLSX https://drive.google.com/open?id=0B3S4vhAbS0W2c19jZGptMjRFaXc
Can someone have a look at it?
I had a look at it, i.e. used your code and the non working XLS, and it works for me with the current trunk using Libre Office (Ubuntu) and Excel 2016 (Windows).