diff --git a/modules/helma/Chart.js b/modules/helma/Chart.js index c05d3515..6f699ebc 100644 --- a/modules/helma/Chart.js +++ b/modules/helma/Chart.js @@ -18,12 +18,12 @@ /** * @fileoverview Fields and methods of the helma.Chart prototype *

- * To use this optional module, its repository needs to be added to the + * To use this optional module, its repository needs to be added to the * application, for example by calling app.addRepository('modules/helma/Chart.js') */ // take care of any dependencies -app.addRepository('modules/helma/jxl.jar'); +app.addRepository('modules/helma/jxl-2.5.7.jar'); /** * Define the global namespace if not existing @@ -55,12 +55,12 @@ helma.Chart = function(fpath, prefix, sheetName) { var workbook, file; try { - file = new java.io.File(fpath); + file = new java.io.File(fpath); workbook = JXLPKG.getWorkbook(file); } catch (e) { if (e instanceof TypeError == false) throw(e); - throw("helma.Chart needs " + JXLPKGNAME + + throw("helma.Chart needs " + JXLPKGNAME + " in lib/ext or application directory " + "[" + JXLPKGURL + "]"); } @@ -98,9 +98,9 @@ helma.Chart = function(fpath, prefix, sheetName) { * Renders the Excel spreadsheet as XHTML table. */ this.render = function() { - res.write('\n'); - + var rowBuf = []; var rows = sheet.getRows(); var max = 0; @@ -110,7 +110,7 @@ helma.Chart = function(fpath, prefix, sheetName) { max = row.length; rowBuf.push(row); } - + for (var i in rowBuf) { res.write('\n'); for (var n=0; n\n'); } - + res.write('
\n'); workbook.close(); }; diff --git a/modules/helma/build.gradle b/modules/helma/build.gradle index bb827dd3..3222906c 100644 --- a/modules/helma/build.gradle +++ b/modules/helma/build.gradle @@ -1,5 +1,6 @@ dependencies { runtime 'ch.ethz.ganymed:ganymed-ssh2:build208' + runtime 'net.sourceforge.jexcelapi:jxl:2.5.7' } task deps(type: Copy) { diff --git a/modules/helma/jxl-2.5.7.jar b/modules/helma/jxl-2.5.7.jar new file mode 100644 index 00000000..fc1a5a55 Binary files /dev/null and b/modules/helma/jxl-2.5.7.jar differ diff --git a/modules/helma/jxl.jar b/modules/helma/jxl.jar deleted file mode 100644 index 92dc867a..00000000 Binary files a/modules/helma/jxl.jar and /dev/null differ