SpreadSheetParser ssParser = null;
String contentType = (String) reportTemplate.get(0).get(
"fileContentType");
if (contentType
.equals("application/vnd.oasis.opendocument.spreadsheet"))
ssParser = new ODSSpreadSheetParser(templateFile, inputMap);
else if (contentType.equals("application/vnd.ms-excel"))
ssParser = new XLSSpreadSheetParser(templateFile, inputMap);
else
return ServiceUtil.returnError("Unsupport file format");