Alex Reichman
Alex Reichman

Reputation: 129

Looking for solution for exporting data to Excel with Vaadin

We are looking for solution to export the data to excel in Vaadin application. I have downloaded Vaadin excel exporter from GitHub https://github.com/bonprix/vaadin-excel-exporter which sounds to be a very useful utility but I am getting the error below when I am compiling vaadin-excel-exporter-demo project.

<vaadin.version>8.0.6</vaadin.version>

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project vaadin-excel-exporter-demo: Compilation failure: Compilation failure: [ERROR] /C:/Java/Vaadin/VaadinProjetcs/vaadin-excel-exporter-master/vaadin-excel-exporter-master/vaadin-excel-exporter-demo/src/main/java/org/vaadin/addons/excelexporter/demo/DemoUI.java:[12,61] package org.vaadin.addons.excelexporter.configuration.builder does not exist

I've tried mvn clean and also delete the full .m2/repository local repository  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile)

After searching on different forums it looks like maybe this add-on is missing from Maven repo. I have tried version 2.1 and LATEST.

<artifactId>vaadin-excel-exporter</artifactId>
    <packaging>jar</packaging>
    <!--version>2.1-SNAPSHOT</version-->
    <version>LATEST</version>
    <name>Excel Exporter</name>

So I have two questions.

  1. Has anybody had the same problem wih this tool and/or maybe can explain what i am doing wrong.
  2. If this tool is not maybe available anymore can anyone please share the tool which I can use to export the grid data to Excel. I am new with Vaadin so providing the code examples will be highly appreciated

Thanks Alex

Upvotes: 1

Views: 450

Answers (1)

Anna Koskinen
Anna Koskinen

Reputation: 1370

If you look at the add-on through Vaadin directory, you'll find the necessary additions to your pom.xml in the Maven section of the sidebar. In this case, like Erik said in the comments, you are likely missing

<repository>
   <id>vaadin-addons</id>
   <url>https://maven.vaadin.com/vaadin-addons</url>
</repository>

The directory page also includes code samples for using the component after you get the dependencies fixed, as well as other information about the add-on. I haven't tested whether the demo within GitHub works, but the add-on itself should be usable in your project regardless. The newest version published through the directory is 2.0.

If you want to compile the add-on locally rather than use it through the add-on repository, you need to first successfully compile the add-on module, and then use the exact version configured in the pom.xml. Currently the master branch seems to be using <version>2.1-SNAPSHOT</version>.

Upvotes: 1

Related Questions