Community contributed extensions

Excel module

The Excel module allows you to render Excel document. It is rather simple to use as it only requires to import a static file.

Enable the Excel module for the application

In the /conf/application.conf file, enable the Excel module by adding this line:

# The Excel module
module.Excel=${play.path}/modules/Excel

Using the Excel module

The renderExcel() method:

import static play.modules.excel.Excel.*;

And then use the renderExcel() method as you would use the render() method.

The renderExcel() behavior is almost the same as that of render() except the following differences:

  1. the template should be an excel file with “.xls” suffix rather than a text file with ".html"
  2. You can use renderArgs.put(“fileName”, “your-file.xls”) to indicate the name of the excel file to be generated

Known Issue

Please refer to the sample for an example.