Skip to content

希望ExcelFormat可以支持更多格式的自动转换,主要是基础类型 集合/ValueTuple 的转换 #919

@samolulu

Description

@samolulu

Feature Summary

如读取以下单元格时,可通过ExcelFormat决定读取后转成对应格式的集合或ValueTuple

Image

多种自定义格式:
[ExcelFormat("int_int")]
public int[] BornPos {get; set;} //读取为[]{95,25}

 [ExcelFormat("x_y")]
public (int x, int y) BornPos {get; set;}  //读取为tuple:(95,25)

甚至支持多维集合:
单元格内容: 95_25|96_26
属性定义:
[ExcelFormat("array2(int)")]
public int[][] BornPos {get; set;} //读取为 {{95,25}, {96,26}}
或 public List<List> BornPos {get; set;} //读取为 {{95,25}, {96,26}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions