diff --git a/DocxFile使用帮助.docx b/DocxFile使用帮助.docx index 308415b..b38b9a5 100644 Binary files a/DocxFile使用帮助.docx and b/DocxFile使用帮助.docx differ diff --git a/XlsxFile使用帮助.xlsx b/XlsxFile使用帮助.xlsx index e5de951..e7f2b37 100644 Binary files a/XlsxFile使用帮助.xlsx and b/XlsxFile使用帮助.xlsx differ diff --git a/funcext/TSOffice/TOfficeObj.tsf b/funcext/TSOffice/TOfficeObj.tsf index b365f0a..e97d0fe 100644 --- a/funcext/TSOffice/TOfficeObj.tsf +++ b/funcext/TSOffice/TOfficeObj.tsf @@ -1,4 +1,4 @@ -// Version 1.7.0 +// Version 1.7.1 Function TOfficeObj(n); Begin case lowercase(n) of @@ -11009,7 +11009,7 @@ Type TParagraph = Class(DocObject, TParagraphImpl) Function AddHyperLink(); Begin o := new TWHyperLink(); - NewChildNode( array("field":"", "name":"w:r", "obj":o, "attrEx":"", "nodeType":"") ); + NewChildNode( array("field":"", "name":"w:hyperlink", "obj":o, "attrEx":"", "nodeType":"") ); return o; End; @@ -11699,7 +11699,7 @@ Type TChart = Class(TChartImpl) Function NewExcelFile(); Begin - Excel := new TSExcelFile(); + Excel := new TSXlsxFile(); [err, errmsg] := Excel.NewFile(); if err then Excel := nil; diff --git a/funcext/TSOffice/TSDocxFile.tsf b/funcext/TSOffice/TSDocxFile.tsf index 1c65424..9ea9f78 100644 --- a/funcext/TSOffice/TSDocxFile.tsf +++ b/funcext/TSOffice/TSDocxFile.tsf @@ -1,4 +1,4 @@ -// Version 1.7.0 +// Version 1.7.1 Type TSDocxFile = Class ///Version: V1.0 2022-09-20 ///适用于 Microsoft Word docx格式文件 @@ -331,7 +331,7 @@ Type TSDocxFile = Class ///返回TChart对象 Function CopyExcelChart(excelFileName, excelSheetName, chartName, Width, Height, posOpt); Begin - excel := new TSExcelFile(); + excel := new TSXlsxFile(); [err, msg] := excel.OpenFile('', excelFileName); if err then return nil; [err, charts] := excel.GetCharts(excelSheetName); diff --git a/funcext/TSOffice/TSXlsxFile.tsf b/funcext/TSOffice/TSXlsxFile.tsf index b66ff16..b54557c 100644 --- a/funcext/TSOffice/TSXlsxFile.tsf +++ b/funcext/TSOffice/TSXlsxFile.tsf @@ -1,4 +1,4 @@ -// Version 1.7.0 +// Version 1.7.1 Type TSXlsxFile = Class ///Version: V1.0 2022-08-08 ///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。 diff --git a/funcext/TSOffice/worksheet/xlsxComment.tsf b/funcext/TSOffice/worksheet/xlsxComment.tsf index 2d83140..ce002a4 100644 --- a/funcext/TSOffice/worksheet/xlsxComment.tsf +++ b/funcext/TSOffice/worksheet/xlsxComment.tsf @@ -148,7 +148,11 @@ xmlns:v="urn:schemas-microsoft-com:vml"> comment += r_node.FirstChildElement('t').GetText(); r_node := r_node.NextElement(); end - if length(comment) > 1 then comment := comment[2:]; + if length(comment) > 1 then + begin + if comment[1] = "\n" then comment := comment[2:]; + else if comment[1:2] = "\r\n" then comment := comment[3:]; + end return array(author, comment); End; diff --git a/更新日志.md b/更新日志.md index 7c15654..d64a6fd 100644 --- a/更新日志.md +++ b/更新日志.md @@ -1,14 +1,31 @@ # 更新日志 +## 2024-11-19 + +### V1.7.1 + +#### word + +1. 对生成目录的xml结构进行更改 +2. 修复引用excel错误 + +#### excel + +1. 修复获取`comment`时候,换行符问题 + ## 2024-7-8 -### excel +### V1.7.0 + +#### excel 1. 修复`CopySheet`操作后,文件报错问题 ## 2024-5-6 -### excel +### V1.6.9 + +#### excel 1. 修复单元格继承列样式失败问题