Issue 335: How to Set Style for excel (how to get customize excel )
Status:  New
Owner: ----
Reported by sumitra...@gmail.com, Apr 24, 2012
What steps will reproduce the problem?
1. I am overriding getExportTable() for XLS export.
2. I am using Table table = new Table().caption("Presidents");  
3. I am not able to get any setStyle() method for XLS Export

What is the expected output? What do you see instead?
I want to change font size and font color for column fields in Excel

What version of the product are you using? On what operating system?
jdk1.6.0_15,jexcel-2.6.6,jmesa-3.0.1,spring-2.0.2
Please provide any additional information below.


Apr 26, 2012
Project Member #1 jeff.johnston.mn@gmail.com
The style attributes are only applicable for rendering html.

If you want to tweak out the export what you would do is create a custom view. What I would do is copy the export view that you are interested in (either ExcelView or JExcelView) into your project and then tweak it however you need.

Then set the view on your TableModel.

API:

if (tableModel.isExporting() && tableModel.getExportType().equals(ExportType.EXCEL)) {
    tableModel.setView(new CustomExcelView());            
}