dotnetcore / dotnetcore/Magicodes.IE
设置 ShowInputMessage 后,MaxCount 不能小于 200
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 495
- PR merge metrics
- No merged PRs in 30d
Description
### Expected behaviour
设置 ShowInputMessage 后,会给数据行单元格一个提示信息
所有存在提示信息的空行不应被识别为有效的数据行
### Actual behaviour
现在的逻辑:
设置 ShowInputMessage 后,会在前 200 行设置单元格的提示信息。
在导入数据时,哪怕只录入了两行数据,也会识别为有200行数据。
如果同时设置了 MaxCount = 50 ,则会报错:The maximum number of allowed imports cannot be exceeded50!
### I'm seeing this behaviour on
- [ ] Magicodes.IE.Excel
- [ ] Magicodes.IE.Pdf
- [ ] Magicodes.IE.Word
- [ ] Magicodes.IE.Csv
- [ ] Magicodes.IE.Html
- [x] Magicodes.IE.AspNetCore
#### package versions
Magicodes.IE.AspNetCore 2.8.5
### So how can we reproduce this?
```
[ExcelImporter(
MaxCount = 50,
IsLabelingError = true
)]
public class ArriveOrderImport
{
///
/// 货主手机号
///
[Required]
[MaxLength(32)]
[ImporterHeader(
Name = "货主手机号",
Description = "填写货主在系统中的手机号,必须能匹配到已存在的用户,用于生成订单并发送通知",
ShowInputMessage = "请输入已存在的货主手机号",
IsInterValidation = true,
AutoTrim = true,
)]
public string CargoOwner { get; set; } = string.Empty;
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Magicodes.IE.AspNetCore import path and the ExcelImporter and ImporterHeader attributes shown in the reproduction. Run the example with MaxCount = 50 and ShowInputMessage set, entering only two rows. Done means blank rows with input messages are not counted as imported data, so the import stays within MaxCount.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100