ExcelAction with addGeneratedColumn

The ExcelAction button on my table isn’t displaying the values of the column I added using the
myTable.addGenerateColumn() method.

How can I get those values to display without creating my own action?

You can read about using generated columns along with excel action in the documentation.

Thanks. I was having difficulty with the code there, but altered it a bit and had good results.

ordersTable.addGeneratedColumn("product", new Table.PrintableColumnGenerator<Order, String>() { 
    public Component generateCell(Order /*entity*/ order) { 
        Label label = componentsFactory.createComponent(Label.NAME); 
        Product product = order.getProduct(); 
        label.setValue(product.getName() + ", " + product.getCost()); 
        return label; 
    public String getValue(Order /*entity*/ order) { 
        Product product = order.getProduct(); 
        return product.getName() + ", " + product.getCost();