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