This commit is contained in:
csh 2024-11-19 18:26:49 +08:00
parent 066a8f6562
commit c7b7971d9a
7 changed files with 30 additions and 9 deletions

Binary file not shown.

Binary file not shown.

View File

@ -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;

View File

@ -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);

View File

@ -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 等多种文档格式。

View File

@ -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;

View File

@ -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. 修复单元格继承列样式失败问题