You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a (link to a) minimal demo app showing the faulty behaviour.
Sweet ⭐⭐⭐⭐
Provide a concise code sample which can upload attachments.
将 var filePath = Path.Combine(Directory.GetCurrentDirectory(), "TestFiles", "Import", "班级学生基础数据导入.xlsx"); 文件sheet中的第一个列删除,然后运行以下测试用例即可复现。
[Fact(DisplayName = "班级学生基础数据导入")]
public async Task ClassStudentInfoImporter_Test()
{
var filePath = Path.Combine(Directory.GetCurrentDirectory(), "TestFiles", "Import", "班级学生基础数据导入.xlsx");
var importDic = await Importer.ImportSameSheets<ImportClassStudentDto, ImportStudentDto>(filePath);
foreach (var item in importDic)
{
var import = item.Value;
import.ShouldNotBeNull();
if (import.Exception != null) _testOutputHelper.WriteLine(import.Exception.ToString());
if (import.RowErrors.Count > 0)
_testOutputHelper.WriteLine(JsonConvert.SerializeObject(import.RowErrors));
import.HasError.ShouldBeFalse();
import.Data.ShouldNotBeNull();
import.Data.Count.ShouldBe(16);
}
}
Good ⭐⭐⭐
Provide your own app and instructions how to reproduce the issue.
Meh ⭐⭐
Provide a code sample with a bunch of magic parameters which I need to interpolate by guessing to reconstruct the actual runtime code.
Worst 💩
Say the source code can't be disclosed and refuse to provide any of the above. Expect this issue to be closed by a bunch of angry aliens 👽👽👽👽👽 that will hunt you down and 🔥 your 💻. You've been warned. 🚒
The text was updated successfully, but these errors were encountered:
Farb
added a commit
to Farb/Magicodes.IE
that referenced
this issue
Jan 27, 2024
Expected behaviour
即使缺少列名,也不应该报错空指针,而应该给出具体的错误。当前不使用源码调试的话,根本不知道哪里的问题
Actual behaviour
Tell us what happens instead. Provide a log message if relevant.
导入excel时,实体类的字段在excel中少一个字段
I'm seeing this behaviour on
package versions
PackageReference Include="Magicodes.IE.Excel" Version="2.7.4.5"
So how can we reproduce this?
导入excel时,实体类的字段在excel中少一个字段
Awesome ⭐⭐⭐⭐⭐
Provide a (link to a) minimal demo app showing the faulty behaviour.
Sweet ⭐⭐⭐⭐
Provide a concise code sample which can upload attachments.
将
var filePath = Path.Combine(Directory.GetCurrentDirectory(), "TestFiles", "Import", "班级学生基础数据导入.xlsx");
文件sheet中的第一个列删除,然后运行以下测试用例即可复现。Good ⭐⭐⭐
Provide your own app and instructions how to reproduce the issue.
Meh ⭐⭐
Provide a code sample with a bunch of magic parameters which I need to interpolate by guessing to reconstruct the actual runtime code.
Worst 💩
Say the source code can't be disclosed and refuse to provide any of the above. Expect this issue to be closed by a bunch of angry aliens 👽👽👽👽👽 that will hunt you down and 🔥 your 💻. You've been warned. 🚒
The text was updated successfully, but these errors were encountered: