excelgrailsgroovyexport-to-excelgrails-2.3

Export plugin broken in Grails 2.3.7


We recently encountered a problem with the excel-export plugin with Grails 2.3.7. We've tried both 0.1.4 and 0.1.6, and can recreate the issue in a couple of lines.

import pl.touk.excel.export.WebXlsxExporter

def headers = ['Name', 'Description']

def withProperties = ['name', 'description']

List<Integer> products = new ArrayList<Integer>()

new WebXlsxExporter().with {
    fillHeader(headers)
    add(products, withProperties)
    save()
}

This throws:

No signature of method: fillHeader () is applicable for argument types: (java.util.ArrayList) values: [[Name, Description]]

This was working fine in Grails 2.0.3 with excel-export 0.1.4

Any ideas?


Solution

  • Workaround was to upgrade the plugin to version 0.1.9 which seems to have fixed the issue. But had to explicitly exclude xerces from our maven pom also, which wasn't required before.

    Our pom now looks like:

         <dependency>
            <groupId>org.grails.plugins</groupId>
            <artifactId>excel-export</artifactId>
            <version>0.1.9</version>
            <scope>runtime</scope>
            <type>zip</type>
            <exclusions>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xerces</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>