v1.8.6
This commit is contained in:
parent
bbe0821f68
commit
6b0f11cebb
|
|
@ -0,0 +1,4 @@
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*.cmd
|
||||||
|
script.ps1
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.8.5
|
// Version 1.8.6
|
||||||
Function TOfficeObj(n);
|
Function TOfficeObj(n);
|
||||||
Begin
|
Begin
|
||||||
case lowercase(n) of
|
case lowercase(n) of
|
||||||
|
|
@ -13331,14 +13331,14 @@ Type TDocumentBody = Class(DocObject)
|
||||||
para.Run.T := lines[0];
|
para.Run.T := lines[0];
|
||||||
para.Run.RPr := para.PPr.RPr;
|
para.Run.RPr := para.PPr.RPr;
|
||||||
end
|
end
|
||||||
for i:=1 to length(lines)-1 do Begin
|
for k:=1 to length(lines)-1 do Begin
|
||||||
r := para.AddRun();
|
r := para.AddRun();
|
||||||
r.Br.Val := 1;
|
r.Br.Val := 1;
|
||||||
r.RPr := para.PPr.RPr;
|
r.RPr := para.PPr.RPr;
|
||||||
r := para.AddRun();
|
r := para.AddRun();
|
||||||
r.T := lines[i];
|
r.T := lines[k];
|
||||||
r.RPr := para.PPr.RPr;
|
r.RPr := para.PPr.RPr;
|
||||||
if _preserve(lines[i]) then
|
if _preserve(lines[k]) then
|
||||||
begin
|
begin
|
||||||
r := para.AddRun();
|
r := para.AddRun();
|
||||||
r.Space := "preserve";
|
r.Space := "preserve";
|
||||||
|
|
@ -13559,7 +13559,8 @@ Type TDocumentBody = Class(DocObject)
|
||||||
p := new TParagraph();
|
p := new TParagraph();
|
||||||
p.pPr.NewChildNode( array("field":"", "name":"w:sectPr", "obj":section, "attrEx":"", "nodeType":"") );
|
p.pPr.NewChildNode( array("field":"", "name":"w:sectPr", "obj":section, "attrEx":"", "nodeType":"") );
|
||||||
p := AddParagraph(p, posOpt, '');//段落对象
|
p := AddParagraph(p, posOpt, '');//段落对象
|
||||||
sec := new TDocSection(p.node_, -2, zipfile_);
|
sec := new TDocSection(p.node_, -2, zipfile_);
|
||||||
|
|
||||||
sec.NodeUri := 'w:pPr/w:sectPr';
|
sec.NodeUri := 'w:pPr/w:sectPr';
|
||||||
return sec;
|
return sec;
|
||||||
End;
|
End;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.8.5
|
// Version 1.8.6
|
||||||
Type TSDocxFile = Class
|
Type TSDocxFile = Class
|
||||||
///Version: V1.0 2022-09-20
|
///Version: V1.0 2022-09-20
|
||||||
///适用于 Microsoft Word docx格式文件
|
///适用于 Microsoft Word docx格式文件
|
||||||
|
|
|
||||||
|
|
@ -1,299 +1,299 @@
|
||||||
Type NodeInfo = class
|
Type NodeInfo = class
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(parentObj, name);
|
Function Create(parentObj, name);
|
||||||
Begin
|
Begin
|
||||||
if ifObj(parentObj) then
|
if ifObj(parentObj) then
|
||||||
NodeUri := parentObj.NodeUri = '' ? name : (parentObj.NodeUri + '/' + name);
|
NodeUri := parentObj.NodeUri = '' ? name : (parentObj.NodeUri + '/' + name);
|
||||||
else
|
else
|
||||||
NodeUri := '';
|
NodeUri := '';
|
||||||
NodeName := name;
|
NodeName := name;
|
||||||
ExtAttr := array();
|
ExtAttr := array();
|
||||||
ExtNodes := array();
|
ExtNodes := array();
|
||||||
ReplaceArr := array();
|
ReplaceArr := array();
|
||||||
End
|
End
|
||||||
|
|
||||||
Function Root(); virtual;
|
Function Root(); virtual;
|
||||||
Begin
|
Begin
|
||||||
return RootObj;
|
return RootObj;
|
||||||
End
|
End
|
||||||
|
|
||||||
Function Update(position);overload;
|
Function Update(position);overload;
|
||||||
Begin
|
Begin
|
||||||
if ifObj(RootObj) then Begin
|
if ifObj(RootObj) then Begin
|
||||||
arr := Marshal();
|
arr := Marshal();
|
||||||
if length(arr['attributes']) or length(arr['children']) then Begin
|
if length(arr['attributes']) or length(arr['children']) then Begin
|
||||||
curNode := class(TSXml).GetNode(RootObj, NodeUri, position);
|
curNode := class(TSXml).GetNode(RootObj, NodeUri, position);
|
||||||
if ifObj(curNode) then
|
if ifObj(curNode) then
|
||||||
class(TSXml).UpdateNode(curNode, arr['attributes'], arr['children']);
|
class(TSXml).UpdateNode(curNode, arr['attributes'], arr['children']);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function Update();overload;
|
Function Update();overload;
|
||||||
Begin
|
Begin
|
||||||
self.Update("end");
|
self.Update("end");
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function Delete();overload;
|
Function Delete();overload;
|
||||||
Begin
|
Begin
|
||||||
if ifObj(RootObj) then
|
if ifObj(RootObj) then
|
||||||
begin
|
begin
|
||||||
curNode := class(TSXml).GetNode(RootObj, NodeUri);
|
curNode := class(TSXml).GetNode(RootObj, NodeUri);
|
||||||
if ifObj(curNode) then curNode.DeleteChildren();
|
if ifObj(curNode) then curNode.DeleteChildren();
|
||||||
end
|
end
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function Delete(name);overload;
|
Function Delete(name);overload;
|
||||||
Begin
|
Begin
|
||||||
if not ifObj(RootObj) then return false;
|
if not ifObj(RootObj) then return false;
|
||||||
node := NodeUri <> '' ? class(TSXml).GetNode(RootObj, NodeUri) : RootObj;
|
node := NodeUri <> '' ? class(TSXml).GetNode(RootObj, NodeUri) : RootObj;
|
||||||
|
|
||||||
attrs := GetAttrsEx();
|
attrs := GetAttrsEx();
|
||||||
lName := lowerCase(name);
|
lName := lowerCase(name);
|
||||||
r := sselect * from attrs where lName = lowerCase([0]) end;
|
r := sselect * from attrs where lName = lowerCase([0]) end;
|
||||||
if istable(r) then
|
if istable(r) then
|
||||||
begin
|
begin
|
||||||
node.DeleteAttribute(r[1]);
|
node.DeleteAttribute(r[1]);
|
||||||
return true;
|
return true;
|
||||||
end
|
end
|
||||||
|
|
||||||
children := GetChildren();
|
children := GetChildren();
|
||||||
r := select * from children where lName = lowerCase(['field']) end;
|
r := select * from children where lName = lowerCase(['field']) end;
|
||||||
if istable(r) then Begin
|
if istable(r) then Begin
|
||||||
r := r[0];
|
r := r[0];
|
||||||
delete_node := node.FirstChildElement(r['name']);
|
delete_node := node.FirstChildElement(r['name']);
|
||||||
if ifObj(delete_node) then
|
if ifObj(delete_node) then
|
||||||
begin
|
begin
|
||||||
node.DeleteChild(delete_node);
|
node.DeleteChild(delete_node);
|
||||||
return true;
|
return true;
|
||||||
end
|
end
|
||||||
End;
|
End;
|
||||||
return false;
|
return false;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function GetAttrs(); virtual;
|
Function GetAttrs(); virtual;
|
||||||
Begin
|
Begin
|
||||||
return ExtAttr;
|
return ExtAttr;
|
||||||
End
|
End
|
||||||
|
|
||||||
Function GetChildren(); virtual;
|
Function GetChildren(); virtual;
|
||||||
Begin
|
Begin
|
||||||
return ExtNodes;
|
return ExtNodes;
|
||||||
End
|
End
|
||||||
|
|
||||||
Function GetNode(index); // 返回的index的对象
|
Function GetNode(index); // 返回的index的对象
|
||||||
Begin
|
Begin
|
||||||
return ExtNodes[index]['obj'];
|
return ExtNodes[index]['obj'];
|
||||||
End
|
End
|
||||||
|
|
||||||
Function GetCount(); // 返回当前节点的个数
|
Function GetCount(); // 返回当前节点的个数
|
||||||
Begin
|
Begin
|
||||||
return length(ExtAttr);
|
return length(ExtAttr);
|
||||||
End
|
End
|
||||||
|
|
||||||
// arr := array(('Size', 'sz', 15), ('Style', 'style', 'line'));
|
// arr := array(('Size', 'sz', 15), ('Style', 'style', 'line'));
|
||||||
Function AddAttr(arr); // 添加属性
|
Function AddAttr(arr); // 添加属性
|
||||||
Begin
|
Begin
|
||||||
if not istable(arr) then return;
|
if not istable(arr) then return;
|
||||||
ExtAttr union= arr;
|
ExtAttr union= arr;
|
||||||
return 1;
|
return 1;
|
||||||
End
|
End
|
||||||
|
|
||||||
Function Marshal();
|
Function Marshal();
|
||||||
Begin
|
Begin
|
||||||
children_ := nil;
|
children_ := nil;
|
||||||
GetChildrenEx(); //优化为变量,减少数据COPY,2022-12-10
|
GetChildrenEx(); //优化为变量,减少数据COPY,2022-12-10
|
||||||
child_arr := array();
|
child_arr := array();
|
||||||
name_map := array();
|
name_map := array();
|
||||||
len := 0;
|
len := 0;
|
||||||
for i:=0 to length(children_)-1 do
|
for i:=0 to length(children_)-1 do
|
||||||
begin
|
begin
|
||||||
node_type := children_[i]['nodeType'];
|
node_type := children_[i]['nodeType'];
|
||||||
obj := children_[i]['obj'];
|
obj := children_[i]['obj'];
|
||||||
if ifnil(obj) then continue;
|
if ifnil(obj) then continue;
|
||||||
if not ifObj(obj) and not ifnil(name_map[children_[i]['name']]) and children_[i]['attrEx'] <> '' then
|
if not ifObj(obj) and not ifnil(name_map[children_[i]['name']]) and children_[i]['attrEx'] <> '' then
|
||||||
begin
|
begin
|
||||||
child_arr[name_map[children_[i]['name']]]['attributes'] union=array(children_[i]['attrEx'] : obj);
|
child_arr[name_map[children_[i]['name']]]['attributes'] union=array(children_[i]['attrEx'] : obj);
|
||||||
continue;
|
continue;
|
||||||
end
|
end
|
||||||
|
|
||||||
arr := array('type': 'element', 'name': children_[i]['name'], 'attributes': array());
|
arr := array('type': 'element', 'name': children_[i]['name'], 'attributes': array());
|
||||||
if node_type = 'empty' then // <b/>
|
if node_type = 'empty' then // <b/>
|
||||||
begin
|
begin
|
||||||
empty_name := children_[i]['attrEx'] ? children_[i]['attrEx'] : 'val';
|
empty_name := children_[i]['attrEx'] ? children_[i]['attrEx'] : 'val';
|
||||||
if obj = 0 then arr['attributes'] := array(empty_name: 0);
|
if obj = 0 then arr['attributes'] := array(empty_name: 0);
|
||||||
else if obj = 1 then arr['attributes'] := array(empty_name: 1)
|
else if obj = 1 then arr['attributes'] := array(empty_name: 1);
|
||||||
end
|
end
|
||||||
else if node_type = 'pcdata' then
|
else if node_type = 'pcdata' then
|
||||||
begin
|
begin
|
||||||
arr['children'] := array(('type': 'pcdata', 'value': obj));
|
arr['children'] := array(('type': 'pcdata', 'value': obj));
|
||||||
end
|
end
|
||||||
else if ifObj(obj) then
|
else if ifObj(obj) then
|
||||||
begin
|
begin
|
||||||
marshal := obj.Marshal();
|
marshal := obj.Marshal();
|
||||||
if length(marshal['children'])=0 and length(marshal['attributes'])=0 then continue;
|
if length(marshal['children'])=0 and length(marshal['attributes'])=0 then continue;
|
||||||
arr['children'] := marshal['children'];
|
arr['children'] := marshal['children'];
|
||||||
arr['attributes'] union= marshal['attributes'];
|
arr['attributes'] union= marshal['attributes'];
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
key := children_[i]['attrName'] ? children_[i]['attrName'] : children_[i]['attrEx'] ? children_[i]['attrEx'] : 'val';
|
key := children_[i]['attrName'] ? children_[i]['attrName'] : children_[i]['attrEx'] ? children_[i]['attrEx'] : 'val';
|
||||||
arr['attributes'] := array(key : obj);
|
arr['attributes'] := array(key : obj);
|
||||||
end
|
end
|
||||||
name_map[children_[i]['name']] := len;
|
name_map[children_[i]['name']] := len;
|
||||||
child_arr[len++] := arr;
|
child_arr[len++] := arr;
|
||||||
end
|
end
|
||||||
|
|
||||||
name_arr := str2array(NodeName, '/');
|
name_arr := str2array(NodeName, '/');
|
||||||
tmp_arr := array('type': 'element', 'name': name_arr[length(name_arr)-1], 'children': child_arr);
|
tmp_arr := array('type': 'element', 'name': name_arr[length(name_arr)-1], 'children': child_arr);
|
||||||
for i:=length(name_arr)-2 downto 0 do
|
for i:=length(name_arr)-2 downto 0 do
|
||||||
begin
|
begin
|
||||||
tmp_arr := array('type': 'element', 'name': name_arr[i], 'children': array(tmp_arr));
|
tmp_arr := array('type': 'element', 'name': name_arr[i], 'children': array(tmp_arr));
|
||||||
end
|
end
|
||||||
|
|
||||||
attrs_arr := GetAttrs();
|
attrs_arr := GetAttrs();
|
||||||
tmp_arr['attributes'] := array();
|
tmp_arr['attributes'] := array();
|
||||||
for i:=0 to length(attrs_arr)-1 do
|
for i:=0 to length(attrs_arr)-1 do
|
||||||
begin
|
begin
|
||||||
if not ifnil(attrs_arr[i, 2]) then Begin
|
if not ifnil(attrs_arr[i, 2]) then Begin
|
||||||
tmp_arr['attributes'][ attrs_arr[i, 1] ] := attrs_arr[i, 2];
|
tmp_arr['attributes'][ attrs_arr[i, 1] ] := attrs_arr[i, 2];
|
||||||
End;
|
End;
|
||||||
end
|
end
|
||||||
return tmp_arr;
|
return tmp_arr;
|
||||||
End
|
End
|
||||||
|
|
||||||
Function NewChildNode(nodeArr);
|
Function NewChildNode(nodeArr);
|
||||||
Begin
|
Begin
|
||||||
if not ifarray(nodeArr) then return 0;
|
if not ifarray(nodeArr) then return 0;
|
||||||
if not ifstring(nodeArr['name']) then return 0;
|
if not ifstring(nodeArr['name']) then return 0;
|
||||||
arr := array((
|
arr := array((
|
||||||
'name': nodeArr['name'],
|
'name': nodeArr['name'],
|
||||||
'obj': nodeArr['obj'],
|
'obj': nodeArr['obj'],
|
||||||
'attrEx': nodeArr['attrEx'],
|
'attrEx': nodeArr['attrEx'],
|
||||||
'nodeType': nodeArr['nodeType'],
|
'nodeType': nodeArr['nodeType'],
|
||||||
));
|
));
|
||||||
ExtNodes union= arr;
|
ExtNodes union= arr;
|
||||||
return 1;
|
return 1;
|
||||||
End
|
End
|
||||||
|
|
||||||
Function Value(name, nottransferable);
|
Function Value(name, nottransferable);
|
||||||
Begin
|
Begin
|
||||||
if not ifObj(RootObj) then return nil;
|
if not ifObj(RootObj) then return nil;
|
||||||
if NodeUri <> '' then
|
if NodeUri <> '' then
|
||||||
node := class(TSXml).GetNode(RootObj, NodeUri);
|
node := class(TSXml).GetNode(RootObj, NodeUri);
|
||||||
else
|
else
|
||||||
node := RootObj;
|
node := RootObj;
|
||||||
if not ifObj(node) then return nil;
|
if not ifObj(node) then return nil;
|
||||||
|
|
||||||
attrs := GetAttrsEx();
|
attrs := GetAttrsEx();
|
||||||
lName := lowerCase(name);
|
lName := lowerCase(name);
|
||||||
r := sselect * from attrs where lName = lowerCase([0]) end;
|
r := sselect * from attrs where lName = lowerCase([0]) end;
|
||||||
if istable(r) then
|
if istable(r) then
|
||||||
begin
|
begin
|
||||||
value := node.GetAttribute(r[1]);
|
value := node.GetAttribute(r[1]);
|
||||||
return nottransferable ? value : trystrtofloat(value, r) ? r : value;
|
return nottransferable ? value : trystrtofloat(value, r) ? r : value;
|
||||||
end
|
end
|
||||||
|
|
||||||
children := GetChildren();
|
children := GetChildren();
|
||||||
r := select * from children where lName = lowerCase(['field']) end;
|
r := select * from children where lName = lowerCase(['field']) end;
|
||||||
if istable(r) then Begin
|
if istable(r) then Begin
|
||||||
r := r[0];
|
r := r[0];
|
||||||
node := node.FirstChildElement(r['name']);
|
node := node.FirstChildElement(r['name']);
|
||||||
if not ifObj(node) and r['nodeType'] = 'empty' and not nottransferable then return false;
|
if not ifObj(node) and r['nodeType'] = 'empty' and not nottransferable then return false;
|
||||||
if not ifObj(node) then return nil;
|
if not ifObj(node) then return nil;
|
||||||
if r['nodeType'] = 'pcdata' then //返回文本串
|
if r['nodeType'] = 'pcdata' then //返回文本串
|
||||||
return node.GetText();
|
return node.GetText();
|
||||||
if ifObj(r['obj']) then //对象,返回XML串
|
if ifObj(r['obj']) then //对象,返回XML串
|
||||||
return node.Data();
|
return node.Data();
|
||||||
key := r['attrName'] ? r['attrName'] : r['attrEx'] ? r['attrEx'] : 'val';
|
key := r['attrName'] ? r['attrName'] : r['attrEx'] ? r['attrEx'] : 'val';
|
||||||
value := node.GetAttribute(key);
|
value := node.GetAttribute(key);
|
||||||
if r['nodeType'] = 'empty' and value = '' then return true;
|
if r['nodeType'] = 'empty' and value = '' then return true;
|
||||||
return nottransferable ? value : trystrtofloat(value, r) ? r : value;
|
return nottransferable ? value : trystrtofloat(value, r) ? r : value;
|
||||||
End;
|
End;
|
||||||
return nil;
|
return nil;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function Replace(hash, bChild);
|
Function Replace(hash, bChild);
|
||||||
Begin
|
Begin
|
||||||
if istable(hash) then Begin
|
if istable(hash) then Begin
|
||||||
ReplaceArr := hash;
|
ReplaceArr := hash;
|
||||||
replaceNodeName();
|
replaceNodeName();
|
||||||
if bChild then Begin
|
if bChild then Begin
|
||||||
r := GetChildren();
|
r := GetChildren();
|
||||||
for i:=0 to length(r)-1 do Begin
|
for i:=0 to length(r)-1 do Begin
|
||||||
if ifObj(r[i]['obj']) then
|
if ifObj(r[i]['obj']) then
|
||||||
r[i]['obj'].Replace(hash, bChild);
|
r[i]['obj'].Replace(hash, bChild);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
End
|
End
|
||||||
|
|
||||||
Function GetChildrenEx();
|
Function GetChildrenEx();
|
||||||
Begin
|
Begin
|
||||||
if not ifarray(children_) then Begin
|
if not ifarray(children_) then Begin
|
||||||
children_ := getChildren();
|
children_ := getChildren();
|
||||||
if not istable(ReplaceArr) then Begin
|
if not istable(ReplaceArr) then Begin
|
||||||
for i:=0 to length(children_)-1 do Begin
|
for i:=0 to length(children_)-1 do Begin
|
||||||
if ifarray(children_[i]['obj']) then Begin
|
if ifarray(children_[i]['obj']) then Begin
|
||||||
if istable(children_[i]['obj']) then
|
if istable(children_[i]['obj']) then
|
||||||
hasArr := 1;
|
hasArr := 1;
|
||||||
else
|
else
|
||||||
children_[i]['obj'] := nil;
|
children_[i]['obj'] := nil;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
if hasArr or istable(ReplaceArr) then Begin
|
if hasArr or istable(ReplaceArr) then Begin
|
||||||
a := array();
|
a := array();
|
||||||
for i:=0 to length(children_)-1 do Begin
|
for i:=0 to length(children_)-1 do Begin
|
||||||
if istable(ReplaceArr) then
|
if istable(ReplaceArr) then
|
||||||
children_[i]['name'] := ReplaceName(children_[i]['name']);
|
children_[i]['name'] := ReplaceName(children_[i]['name']);
|
||||||
if istable(children_[i]['obj']) then Begin
|
if istable(children_[i]['obj']) then Begin
|
||||||
a union= children_[i]['obj'];
|
a union= children_[i]['obj'];
|
||||||
End
|
End
|
||||||
else
|
else
|
||||||
a[ length(a) ] := children_[i];
|
a[ length(a) ] := children_[i];
|
||||||
end;
|
end;
|
||||||
children_ := a;
|
children_ := a;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function GetAttrsEx();
|
Function GetAttrsEx();
|
||||||
Begin
|
Begin
|
||||||
return GetAttrs();//暂时没有发现需要更新属性前缀的情况
|
return GetAttrs();//暂时没有发现需要更新属性前缀的情况
|
||||||
if not istable(ReplaceArr) then return GetAttrs();
|
if not istable(ReplaceArr) then return GetAttrs();
|
||||||
attr := GetAttrs();
|
attr := GetAttrs();
|
||||||
for i:=0 to length(attr)-1 do
|
for i:=0 to length(attr)-1 do
|
||||||
attr[i][1] := ReplaceName(attr[i][1]);
|
attr[i][1] := ReplaceName(attr[i][1]);
|
||||||
return attr;
|
return attr;
|
||||||
End
|
End
|
||||||
|
|
||||||
private
|
private
|
||||||
Function replaceNodeName();
|
Function replaceNodeName();
|
||||||
Begin
|
Begin
|
||||||
for k, v in ReplaceArr do
|
for k, v in ReplaceArr do
|
||||||
begin
|
begin
|
||||||
NodeName := ReplaceStr(NodeName, k, v);
|
NodeName := ReplaceStr(NodeName, k, v);
|
||||||
end
|
end
|
||||||
End
|
End
|
||||||
|
|
||||||
Function ReplaceName(name);
|
Function ReplaceName(name);
|
||||||
Begin
|
Begin
|
||||||
for k,v in ReplaceArr do Begin
|
for k,v in ReplaceArr do Begin
|
||||||
if k='' then
|
if k='' then
|
||||||
name := v + name;
|
name := v + name;
|
||||||
else
|
else
|
||||||
name := ReplaceStr(name, k, v);
|
name := ReplaceStr(name, k, v);
|
||||||
End;
|
End;
|
||||||
return name;
|
return name;
|
||||||
End;
|
End;
|
||||||
public
|
public
|
||||||
NodeName;
|
NodeName;
|
||||||
ExtAttr;
|
ExtAttr;
|
||||||
ExtNodes;
|
ExtNodes;
|
||||||
ReplaceArr;
|
ReplaceArr;
|
||||||
RootObj; // xml node
|
RootObj; // xml node
|
||||||
NodeUri:string;
|
NodeUri:string;
|
||||||
children_;
|
children_;
|
||||||
End
|
End
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.8.5
|
// Version 1.8.6
|
||||||
Type TSXlsxFile = Class
|
Type TSXlsxFile = Class
|
||||||
///Version: V1.0 2022-08-08
|
///Version: V1.0 2022-08-08
|
||||||
///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。
|
///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。
|
||||||
|
|
@ -344,7 +344,7 @@ Type TSXlsxFile = Class
|
||||||
[err, cell] := CoordinatesToCellName(colNum + j, rowNum + i);
|
[err, cell] := CoordinatesToCellName(colNum + j, rowNum + i);
|
||||||
j++;
|
j++;
|
||||||
ret := SetCellValue(sheet, cell, v);
|
ret := SetCellValue(sheet, cell, v);
|
||||||
if not ret then return array(1, "error")
|
if not ret then return array(1, "error");
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
return array(0, "OK");
|
return array(0, "OK");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue