diff --git a/funcext/TSOffice/TOfficeObj.tsf b/funcext/TSOffice/TOfficeObj.tsf index 7b5a415..22f3871 100644 --- a/funcext/TSOffice/TOfficeObj.tsf +++ b/funcext/TSOffice/TOfficeObj.tsf @@ -1,4 +1,4 @@ -// Version 1.7.3 +// Version 1.7.4 Function TOfficeObj(n); Begin case lowercase(n) of diff --git a/funcext/TSOffice/TSDocxFile.tsf b/funcext/TSOffice/TSDocxFile.tsf index 7823249..46d5885 100644 --- a/funcext/TSOffice/TSDocxFile.tsf +++ b/funcext/TSOffice/TSDocxFile.tsf @@ -1,4 +1,4 @@ -// Version 1.7.3 +// Version 1.7.4 Type TSDocxFile = Class ///Version: V1.0 2022-09-20 ///适用于 Microsoft Word docx格式文件 @@ -390,6 +390,7 @@ Type TSDocxFile = Class ///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组 Function InsertFile(alias, fileName, posOpt);overload; Begin + document_.AddNameSpace('w16du', 'http://schemas.microsoft.com/office/word/2023/wordml/word16du'); docxObj := new TSDocxFile(); [err, msg] := docxObj.OpenFile(alias, fileName); if err then return array(err, msg); @@ -408,6 +409,7 @@ Type TSDocxFile = Class ///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组 Function InsertFile(docxObj, posOpt);overload; Begin + document_.AddNameSpace('w16du', 'http://schemas.microsoft.com/office/word/2023/wordml/word16du'); copy_obj := new TDocxCopy(self, docxObj); copy_obj.Init(); copy_obj.Copy(posOpt); diff --git a/funcext/TSOffice/TSXlsxFile.tsf b/funcext/TSOffice/TSXlsxFile.tsf index b5d69d1..7b539eb 100644 --- a/funcext/TSOffice/TSXlsxFile.tsf +++ b/funcext/TSOffice/TSXlsxFile.tsf @@ -1,4 +1,4 @@ -// Version 1.7.3 +// Version 1.7.4 Type TSXlsxFile = Class ///Version: V1.0 2022-08-08 ///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。 diff --git a/funcext/TSOffice/document/docxDocument.tsf b/funcext/TSOffice/document/docxDocument.tsf index f0a1bcb..76305af 100644 --- a/funcext/TSOffice/document/docxDocument.tsf +++ b/funcext/TSOffice/document/docxDocument.tsf @@ -20,6 +20,11 @@ Type docxDocument = Class Begin return body_; End; + + Function AddNameSpace(prefix, uri); + Begin + root_.SetAttribute('xmlns:' + prefix, uri); + End; Function GetBookMarkID(); Begin diff --git a/更新日志.md b/更新日志.md index 0a767b6..1663123 100644 --- a/更新日志.md +++ b/更新日志.md @@ -1,5 +1,13 @@ # 更新日志 +## 2024-12-23 + +### V1.7.4 + +### word + +1. `insertfile`时候默认添加`w16du`命名空间 + ## 2024-12-05 ### V1.7.3