Skip to content

[BUG] -CSV Query<T> ,T中int 类型的字段当其对应的单元格内容为空时会报错 #921

@samolulu

Description

@samolulu

版本:1.41.3

文件类型: CSV

描述:Query ,T中 int(非可null)类型的成员,当其对应的单元格为空内容时会报错

Image Image

期望:当int成员对应单元格内容为空或空格时,对成员赋值0; 或者支持配置对空白单元格的处理方式.

报错堆栈:
Error:ColumnName: Header, CellRow: 2, Value: . The value cannot be cast to type Int32. excelName:Army sheetName:Monster. at MiniExcelLibs.Utils.TypeHelper.TypeMapping[T] (T v, MiniExcelLibs.Utils.ExcelColumnInfo pInfo, System.Object itemValue, System.Int32 rowIndex, System.String startCell, MiniExcelLibs.Configuration config) [0x000b3] in <c9cf334f0a7345a2834b38ee8523d4ea>:0 at MiniExcelLibs.OpenXml.ExcelOpenXmlSheetReader+<QueryImpl>d__151[T].MoveNext () [0x001e2] in :0
at MiniExcelLibs.MiniExcel+d__271[T].MoveNext () [0x000a7] in <c9cf334f0a7345a2834b38ee8523d4ea>:0 at MiniExcelLibs.MiniExcel+<Query>d__261[T].MoveNext () [0x000a7] in :0
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions