This commit is contained in:
csh 2025-10-30 15:50:10 +08:00
parent a2c3905cd0
commit 2b62e4e1a5
5 changed files with 20 additions and 8 deletions

View File

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

View File

@ -1,4 +1,4 @@
// Version 1.8.2
// Version 1.8.3
Type TSDocxFile = Class
///Version: V1.0 2022-09-20
///适用于 Microsoft Word docx格式文件

View File

@ -1,4 +1,4 @@
// Version 1.8.2
// Version 1.8.3
Type TSXlsxFile = Class
///Version: V1.0 2022-08-08
///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。
@ -315,14 +315,14 @@ Type TSXlsxFile = Class
Begin
if not ifarray(data) or length(data)=0 then
return array(-1, "Invalid Data.");
if FieldCount(data)=0 then Begin //数据是一维数组
if mcols(data) = 0 then Begin //数据是一维数组
return SetSheetRow(sheet, axis, data);
End;
[err, colNum, rowNum] := CellNameToCoordinates(axis);
if err then
return array(err, colNum);
if IncludeHeader then Begin
fields := FieldNames(data);
fields := mcols(data, 1);
if IncludeIndex then Begin
fields := array("Index") union fields;
End;

View File

@ -178,7 +178,7 @@ Type xlsxWorkBook = Class
data := o.Import(topLeft, bottomRight, includeHeader, includeIndex, forceSingle);
if not TOfficeApi().IsUtf8() then
begin
fields := fieldnames(data);
fields := mcols(data, 1);
if ifarray(fields) and length(fields) then
begin
map := array();

View File

@ -1,15 +1,27 @@
# 更新日志
## 2025-10-30
### V1.8.3
#### word
1. `setData`移除`fieldNames`依赖
#### excel
1. `InsertTable/GetTable`移除`fieldNames` 依赖
## 2025-10-29
### V1.8.2
### word
#### word
1. 升级段落判空`Empty`
2. 修复`FileName`总是返回 gbk
### excel
#### excel
1. 修复`CopySheet`依赖的`ReplaceStrByReg`公共方法问题,不再依赖该方法
2. 修复`FileName`总是返回 gbk