This commit is contained in:
hans 2022-02-18 15:11:12 +08:00
parent 1912059347
commit 213ec6c506
4 changed files with 10 additions and 6 deletions

View File

@ -97,8 +97,8 @@ Type ExcelFile = Class
End;
///复制sheet
///from_sheet: string工作表名称
///to_sheet: string工作表名称
///from_sheet: int工作表序号
///to_sheet: int工作表序号
///返回: [err, info]
Function CopySheet(from_sheet, to_sheet);
Begin
@ -796,7 +796,7 @@ Type ExcelFile = Class
///返回: [err, link:string]
Function GetCellHyperLink(sheet, axis);
Begin
return xlsx_call("GetCellHyperLink", fh_, sheet);
return xlsx_call("GetCellHyperLink", fh_, sheet, axis);
End;
///设置富文本格式
@ -880,7 +880,7 @@ Type ExcelFile = Class
///添加批注
///sheet: string工作表名称
///axis: string单元格如"A7"
///comment: string
///comment: stringjson串如: '{"author":"Excelize: ","text":"This is a comment."}'
///返回: [err, info]
Function AddComment(sheet, axis, comment);
Begin
@ -1514,7 +1514,11 @@ Type ExcelFile = Class
if err then
return array(err, colNum);
if IncludeHeader then Begin
[err, info] := SetSheetRow(sheet, axis, FieldNames(data));
fields := FieldNames(data);
if IncludeIndex then Begin
fields := array("Index") union fields;
End;
[err, info] := SetSheetRow(sheet, axis, fields);
if err then
return array(err, info);
rowNum ++;
@ -1591,7 +1595,7 @@ Type ExcelFile = Class
r[cnt][0] := i - row1 + 1;
End;
for j:=col1 to col2 do Begin
[err, cell] := CoordinatesToCellName(col1, i);
[err, cell] := CoordinatesToCellName(j, i);
if err then
return array(err, cell);
[err, v, datatype] := GetCellValue(sheet, cell);

Binary file not shown.

Binary file not shown.

Binary file not shown.