// Create a zip file stream FileOutputStream outputStream = null; try { outputStream = new FileOutputStream("SaveWorksheetToHtmlWithInlineCss.zip"); } catch (FileNotFoundException e) { e.printStackTrace(); } // Create a new workbook Workbook workbook = new Workbook(); // Open an excel file InputStream fileStream = this.getResourceStream("xlsx/BreakEven.xlsx"); workbook.open(fileStream); HtmlSaveOptions options = new HtmlSaveOptions(); // Set the css export type to inline css. options.setCssExportType(CssExportType.Inline); workbook.save(outputStream, options); // Close the zip stream try { outputStream.close(); } catch (IOException e) { e.printStackTrace(); }