update two template
This commit is contained in:
parent
d08dea6bc9
commit
8f6bdd212b
|
|
@ -10,7 +10,6 @@ Begin
|
||||||
str += '"' $ value $ '"';
|
str += '"' $ value $ '"';
|
||||||
else
|
else
|
||||||
str = str $ value;
|
str = str $ value;
|
||||||
println("str = {}", str);
|
|
||||||
eval(&str);
|
eval(&str);
|
||||||
TOfficeApi().Set('LastTable', table);
|
TOfficeApi().Set('LastTable', table);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
Function _WordTemplate(alias, fileName);
|
Function _WordTemplate(data, template, fileName);
|
||||||
Begin
|
Begin
|
||||||
|
setsysparam('data', data);
|
||||||
docx := new TSDocxFile();
|
docx := new TSDocxFile();
|
||||||
[err, msg] := docx.OpenFile(alias, fileName);
|
[err, msg] := docx.OpenFile('', template);
|
||||||
if err then return false;
|
if err then return false;
|
||||||
docx.ExecInnerTSL();
|
docx.ExecInnerTSL();
|
||||||
[err, msg] := docx.Save();
|
if ifstring(fileName) then
|
||||||
|
begin
|
||||||
|
[err, msg] := docx.SaveAs('', fileName);
|
||||||
if err then return false;
|
if err then return false;
|
||||||
|
end
|
||||||
return true;
|
return true;
|
||||||
End;
|
End;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue