Reputation: 478
In my table I have a column defined as follows:
table.addContainerProperty("Skill", Label.class, null);
When I export this table using TableExport addon
Button excelExportButton = new Button("Export to Excel", click -> {
ExcelExport excelExport;
excelExport = new ExcelExport(table);
excelExport.setReportTitle("Foo Bar");
excelExport.setDisplayTotals(false);
excelExport.export();
});
I get com.vaadin.ui.Label@6a3f610e
instead of text. How can I fix this?
Thank you in advance for help.
Upvotes: 1
Views: 617
Reputation: 4967
I have never used the TableExport addon but I have two solutions in my mind:
Use String
as a property type: table.addContainerProperty("Skill", String.class, null);
Create your own extended Label
and override the toString()
method to return the value you want to see in exported excel sheets.
Upvotes: 2