Skip to content

填充时日期格式丢失问题 #228

Closed
@721806280

Description

@721806280
@Getter
@Setter
@EqualsAndHashCode
public class FillData {
    private String name;
    private double number;
    private Date date;
    private LocalDate date2;
}

@Test
    public void t01ReadAndWrite() throws Exception {
        List<FillData> list = ListUtils.newArrayList();
        for (int i = 0; i < 10; i++) {
            FillData fillData = new FillData();
            list.add(fillData);
            fillData.setName("张三");
            fillData.setNumber(5.2);
            fillData.setDate(new Date());
            fillData.setDate2(LocalDate.now());
        }

        EasyExcel.write().file(file07).head(FillData.class)
                .withTemplate(fileTemplate07).sheet().doFill(list);

    }

annotation.xlsx

Image

@psxjoy 🐛 BUG. 请优先修复

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is neededplanningIt may be developed later

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions