This commit is contained in:
csh 2024-12-23 11:07:05 +08:00
parent 2d423ca1fb
commit fdd2bd0fef
5 changed files with 18 additions and 3 deletions

View File

@ -1,4 +1,4 @@
// Version 1.7.3 // Version 1.7.4
Function TOfficeObj(n); Function TOfficeObj(n);
Begin Begin
case lowercase(n) of case lowercase(n) of

View File

@ -1,4 +1,4 @@
// Version 1.7.3 // Version 1.7.4
Type TSDocxFile = Class Type TSDocxFile = Class
///Version: V1.0 2022-09-20 ///Version: V1.0 2022-09-20
///适用于 Microsoft Word docx格式文件 ///适用于 Microsoft Word docx格式文件
@ -390,6 +390,7 @@ Type TSDocxFile = Class
///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组 ///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组
Function InsertFile(alias, fileName, posOpt);overload; Function InsertFile(alias, fileName, posOpt);overload;
Begin Begin
document_.AddNameSpace('w16du', 'http://schemas.microsoft.com/office/word/2023/wordml/word16du');
docxObj := new TSDocxFile(); docxObj := new TSDocxFile();
[err, msg] := docxObj.OpenFile(alias, fileName); [err, msg] := docxObj.OpenFile(alias, fileName);
if err then return array(err, msg); if err then return array(err, msg);
@ -408,6 +409,7 @@ Type TSDocxFile = Class
///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组 ///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组
Function InsertFile(docxObj, posOpt);overload; Function InsertFile(docxObj, posOpt);overload;
Begin Begin
document_.AddNameSpace('w16du', 'http://schemas.microsoft.com/office/word/2023/wordml/word16du');
copy_obj := new TDocxCopy(self, docxObj); copy_obj := new TDocxCopy(self, docxObj);
copy_obj.Init(); copy_obj.Init();
copy_obj.Copy(posOpt); copy_obj.Copy(posOpt);

View File

@ -1,4 +1,4 @@
// Version 1.7.3 // Version 1.7.4
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 等多种文档格式。

View File

@ -21,6 +21,11 @@ Type docxDocument = Class
return body_; return body_;
End; End;
Function AddNameSpace(prefix, uri);
Begin
root_.SetAttribute('xmlns:' + prefix, uri);
End;
Function GetBookMarkID(); Function GetBookMarkID();
Begin Begin
if bookmarkid_ < 0 then Begin if bookmarkid_ < 0 then Begin

View File

@ -1,5 +1,13 @@
# 更新日志 # 更新日志
## 2024-12-23
### V1.7.4
### word
1. `insertfile`时候默认添加`w16du`命名空间
## 2024-12-05 ## 2024-12-05
### V1.7.3 ### V1.7.3