String queryName = UUID.randomUUID().toString();
//fileContent = ServletUtil.replaceParameters(servletRequest, fileContent);
//queryResource.createQuery(queryName, null, null, null, fileContent, queryName, null);
//queryResource.execute(queryName, formatter, 0);
Map<String, String> parameters = ServletUtil.getParameters(servletRequest);
ThinQuery tq = query2Resource.createQuery(queryName, fileContent, null, null);
if (parameters != null) {
tq.getParameters().putAll(parameters);
}
query2Resource.execute(tq);
return query2Resource.getQueryExcelExport(queryName, formatter);
} catch (Exception e) {
LOG.error("Error exporting XLS for file: " + file, e);