new(basic.gblib): Fix in SAVE xlsx version.
This commit is contained in:
parent
8a61d1f0a1
commit
66ea211dd5
1 changed files with 18 additions and 7 deletions
|
@ -1063,13 +1063,6 @@ export class KeywordsExpressions {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
keywords[i++] = [
|
|
||||||
/^\s*save\s*(\w+\$*)\s*as\s*(.*)/gim,
|
|
||||||
($0, $1, $2, $3) => {
|
|
||||||
return `await sys.saveFile({pid: pid, file: ${$2}, data: ${$1}})`;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
keywords[i++] = [
|
keywords[i++] = [
|
||||||
/^\s*(save)(\s*)(.*\.xlsx)(.*)/gim,
|
/^\s*(save)(\s*)(.*\.xlsx)(.*)/gim,
|
||||||
($0, $1, $2, $3, $4) => {
|
($0, $1, $2, $3, $4) => {
|
||||||
|
@ -1080,6 +1073,13 @@ export class KeywordsExpressions {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
keywords[i++] = [
|
||||||
|
/^\s*save\s*(\w+\$*)\s*as\s*(.*)/gim,
|
||||||
|
($0, $1, $2, $3) => {
|
||||||
|
return `await sys.saveFile({pid: pid, file: ${$2}, data: ${$1}})`;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
keywords[i++] = [
|
keywords[i++] = [
|
||||||
/^\s*(save)(\s*)(.*)(.*)/gim,
|
/^\s*(save)(\s*)(.*)(.*)/gim,
|
||||||
($0, $1, $2, $3, $4) => {
|
($0, $1, $2, $3, $4) => {
|
||||||
|
@ -1087,6 +1087,17 @@ export class KeywordsExpressions {
|
||||||
$3 = $3.replace(/\"/g, '');
|
$3 = $3.replace(/\"/g, '');
|
||||||
let fields = $3.split(',');
|
let fields = $3.split(',');
|
||||||
const table = fields[0].trim();
|
const table = fields[0].trim();
|
||||||
|
|
||||||
|
if (table.indexOf('.xlsx') !== -1)
|
||||||
|
{ // Same as SAVE above.
|
||||||
|
$3 = $3.replace(/\'/g, '');
|
||||||
|
$3 = $3.replace(/\"/g, '');
|
||||||
|
$4 = $4.substr(2);
|
||||||
|
return `await sys.save({pid: pid, file: "${$3}", args: [${$4}]})`;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fields.shift();
|
fields.shift();
|
||||||
|
|
||||||
const fieldsAsText = fields.join(',');
|
const fieldsAsText = fields.join(',');
|
||||||
|
|
Loading…
Add table
Reference in a new issue