The difference between poi export xls and xlsx

In the work, the customer needs to change the export excel format from xlsx to xls. After exporting, open the file and export the warning box to prompt that the content format is inconsistent with the file type, and the content can be viewed. There is no problem in viewing the response settings. Later, I found that the reason lies in the creation of the workbook and style. The xlsx format is created with XSSFWorkbook wb = new XSSFWorkbook(); the style is created with XSSFCellStyle; the xls format is created with Workbook wb = new HSSFWorkbook(). Created with CellStyle so that the alert box doesn't appear

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327014162&siteId=291194637
Recommended