I'm currently using the Apache POI library to generate excel files in Java.
Here's what I'm wondering: In excel, it's possible to create new cell styles which will be added to the workbook. These styles are reusable and can be selected from the styles table.
Using Apache POI, you can do something similar when constructing a workbook. You can create a new XSSFCellstyle, which is attached to the workbook, and can be applied to as many cells as you want. However, these styles are not reusable. If I open the resulting workbook in excel, and change one of the cell styles, I will never be able to change it back to the unnamed style I generated in XSSF. These styles are not added to the styles table of the workbook.
I'm just wondering, is there any means of creating named styles in an apache POI workbook, which can then be seen and resused after the document is opened in excel?
EDIT: On further investigation there appears to be a way to do this using HSSF, we can use:
cellStyle.setUserStyleName("Header")
I can't find any info on an XSSF equivalent though. Anyone know if it's possible?