code: public static void renderTemplateAsExcel(String templateName, Object... args) {
  
  		// Template datas
  		Scope.RenderArgs templateBinding = Scope.RenderArgs.current();
  		for (Object o : args) {
  			List<String> names = LocalvariablesNamesEnhancer.LocalVariablesNamesTracer
  					.getAllLocalVariableNames(o);
  			for (String name : names) {
  				templateBinding.put(name, o);
  			}
  		}
  		templateBinding.put("session", Scope.Session.current());
  		templateBinding.put("request", Http.Request.current());
  		templateBinding.put("flash", Scope.Flash.current());
  		templateBinding.put("params", Scope.Params.current());
  		if (null == templateBinding.get("fileName")) {
  			templateBinding.put("fileName", templateName.substring(templateName.lastIndexOf("/") + 1) + ".xls");
  		}
  		//Logger.trace("fileName: " + templateBinding.get("fileName"));
  		try {
  			templateBinding.put("errors", Validation.errors());
  		} catch (Exception ex) {
  			throw new UnexpectedException(ex);
  		}
  		try {
  			throw new RenderExcelTemplate(templateName + ".xls", templateBinding.data, templateBinding.get("fileName").toString());
  		} catch (TemplateNotFoundException ex) {
  			if (ex.isSourceAvailable()) {
  				throw ex;
  			}
  			StackTraceElement element = PlayException
  					.getInterestingStrackTraceElement(ex);
  			if (element != null) {
  				throw new TemplateNotFoundException(templateName, Play.classes
  						.getApplicationClass(element.getClassName()), element
  						.getLineNumber());
  			} else {
  				throw ex;
  			}
  		}
  	}
docs: Render a specific template
  
  @param templateName
  The template name
  @param args
  The template data