// Create a zip file stream FileOutputStream outputStream = null; try { outputStream = new FileOutputStream("SaveHtmlWithCellAttributes.zip"); } catch (FileNotFoundException e) { e.printStackTrace(); } // Create a new workbook Workbook workbook = new Workbook(); // Open an excel file InputStream fileStream = this.getResourceStream("xlsx/NetProfit.xlsx"); workbook.open(fileStream); HtmlSaveOptions options = new HtmlSaveOptions(); // Use CellAttributeOptions to add the cell element's address attribute to the exported html file options.getCellAttributeOptions().put(CellAttribute.Address, "address"); workbook.save(outputStream, options); // Close the zip stream try { outputStream.close(); } catch (IOException e) { e.printStackTrace(); }