Hello, we recently migrated from aspose-cells 2.5.0 to aspose-cells 7.1.1.4
This was working just fine with aspose-cells 2.5.0
Please advise
Thanks
try {
com.aspose.cells.Workbook workbook = new Workbook();
WorksheetCollection worksheets = workbook.getWorksheets();
Worksheet worksheet = worksheets.get(0);
Cells cells = worksheet.getCells();
Cell cell = cells.get(0, 0);
cell.putValue("Hello");
Style style = cell.getStyle();
style.setBackgroundColor(Color.getRed());
cell.setStyle(style);
FacesContext ctx = FacesContext.getCurrentInstance();
HttpServletResponse response = (HttpServletResponse) ctx.getExternalContext().getResponse();
response.setHeader("Content-disposition", "attachment; filename=testFlow.xlsx");
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
workbook.save(response.getOutputStream(), FileFormatType.XLSX);
ctx.responseComplete();
} catch (Exception e) {
logger.log(Level.SEVERE, "Test Report Failed", e);
}