dotnetcore / dotnetcore/Magicodes.IE

模板导出table中普通行行高不等于模板第一行的行高

Open
#480 1 comment 0 reactions 0 assignees View on GitHub
area-excel bug
Dominant language
C#
Stars
2.2k
Forks
495
PR merge metrics
No merged PRs in 30d

Description

在commit [4e86a12](https://github.com/dotnetcore/Magicodes.IE/commit/4e86a128c752edf2ed9b35250c82fb81bf8284ec) 中修复了图片行的问题,但是普通行没做处理。按逻辑是先按模板第一行的格式复制table数据总行数的Rows,然后再另处理有图片的行的行高。

在 [TemplateExportHelper](https://github.com/dotnetcore/Magicodes.IE/blob/969aa849a29aa97038b3a5c4a93c9ae4172353b0/src/Magicodes.ExporterAndImporter.Excel/Utility/TemplateExport/TemplateExportHelper.cs#L332) 这里却使用的是默认的行样式,并未复制到每一行。

看更改历史记录,代码从 `sheet.InsertRow(targetRow, numRowsToInsert,refRow);` 更新为 `sheet.InsertRow(targetRow, numRowsToInsert)`,从复制样式变为使用默认样式。而且table.NewRowStart和refRow是会变化的,应该是 `sheet.InsertRow(targetRow, numRowsToInsert,startRow);` 先复制模板第一行的格式到每一行才对。

所以,这应该算是个Bug?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.