dbgate-plugin-excel
Version:
MS Excel import/export plugin for DbGate
1 lines • 1.35 kB
JavaScript
var plugin;(()=>{"use strict";var e={d:(a,t)=>{for(var l in t)e.o(t,l)&&!e.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:t[l]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};e.r(a),e.d(a,{default:()=>t});const t={fileFormats:[{packageName:"dbgate-plugin-excel",storageType:"excel",extension:"xlsx",name:"MS Excel",readerFunc:"reader@dbgate-plugin-excel",writerFunc:"writer@dbgate-plugin-excel",addFileToSourceList:async({fileName:e},a,t,l)=>{const r=await l("plugins/command",{command:"analyse",packageName:"dbgate-plugin-excel",args:{fileName:e}});for(const l of r)a.push(l),t[`sourceFile_${l}`]={fileName:e,sheetName:l}},args:[{type:"checkbox",name:"singleFile",label:"Create single file",direction:"target"},{type:"number",default:"0",name:"skipHeaderRows",apiName:"skipHeaderRows",label:"Skip header rows",direction:"source"}],getDefaultOutputName:(e,a)=>a.target_excel_singleFile?e:null,getOutputParams:(e,a)=>a.target_excel_singleFile?{sheetName:a[`targetName_${e}`]||e,fileName:"data.xlsx"}:null}],quickExports:[{label:"MS Excel",extension:"xlsx",createWriter:(e,a)=>({functionName:"writer@dbgate-plugin-excel",props:{fileName:e,sheetName:a}})}]};plugin=a})();