Yes, sure you should be able to access your custom style in the template Excel file.
I have tested your scenario using the following sample code with a template file (attached), it works fine and I can get the custom style fine.
Workbook workbook = new Workbook(“Book2style.xlsx”);
StyleCollection styles = workbook.getStyles();
Style style = styles.get(0);
String stringStyleName = “MyCustomStyle”;
Style newStyle = styles.get(stringStyleName);
System.out.println(newStyle.getName()); //MyCustomStyle - OK
I am using our latest version v7.4.2 (JAVA)
, you may download and try it.
If you still find the issue, kindly do attach your template file and paste your runnable code here, we will check your issue soon.