The Batch module can be used to handle batch functionality used within the job. Please note that a batch plugin has to be configured in admin for this product to be functional.
Example
// Example to load XLSX file - first workbook and map against 3 dummy variables // Load Excel library for legacy excel files Editor.Helper.LoadExternal("/Catfish.Web/Scripts/ME2k/lib/js/excel/jszip.js", function () { Editor.Helper.LoadExternal("/Catfish.Web/Scripts/ME2k/lib/js/excel/xlsx.js", function () { // Setup button letbutton = newMEUIUpload(Editor.Loc.Get("batchuploadoptions.uploadbutton.label"), null, function(dummy, event, uploaded) { try { // load the excel file and convert to CSV letwb = XLSX.read(uploaded.originalData); varcsv = XLSX.utils.sheet_to_csv(wb.Sheets[wb.SheetNames[0]]);
// Save the CSV data now Job.Batch.Save(csv, function(shortInfo) { Editor.UI.ShowMessage(shortInfo.Valid ? "Success" : "Failure: " + shortInfo.error); console.log(shortInfo); }); } catch(e) { console.log(e); } }); Editor.UI.Add(null, Editor.Constants.EditorUITarget.BatchArea, button); }); });
The Batch module can be used to handle batch functionality used within the job. Please note that a batch plugin has to be configured in admin for this product to be functional.
Example