I am using below code, for inserting emojis into excel using apache POI-HSSF, Please let me know how can I insert emojis into .xlsx file using POI-XSSF in Java,
Workbook workBook =new HSSFWorkbook();
Sheet createSheet = workBook.createSheet("Emoji");
String str =""+"somevalue";
Row createRow = createSheet.createRow(0);
createRow.createCell(0).setCellValue(str);
//creating a file and writing the Workbook data
try {
FileOutputStream fileOutputStream = new FileOutputStream("/tmp/MyFirstExcel.xls");
workBook.write(fileOutputStream);
fileOutputStream.close();
} catch (IOException iException) {
System.out.println("IO exception occured while creating the file" + iException.getMessage());
}
Any help would be highly appreciated.
This is working since xmlbeans 3.0.0
Someone mentioned version 2.6.2, which is not indexed anymore (as of now, June 2019), so jump directly to 3.x.x