Create Excel Programmatically | Assetmanager API
Hi,
I have HSSFWorkbook Object using wich I have to create an excel file in /content/dam.
//code snippet
InputStream is = new ByteArrayInputStream(workbook.getBytes());
AssetManager assetManager = resourceResolver.adaptTo(AssetManager.class);
assetManager.createAsset("/content/dam/test-report.xls", is, "application/vnd.ms-excel", true);
the above lines creating the excel file,but I am unable to open the file.
how to resolve this issue?
Thanks,
Radhakrishna N