alibaba/easyexcel
View on GitHub如何通过注解或其他方式是 excel 实体对象获取当前实体的行号,不使用 ReadListener 的情况?
Open
#4,058 opened on Dec 3, 2024
0 comments (0 comments)0 reactions (0 reactions)0 assignees (0 assignees)Java33,728 stars (33,728 stars)7,599 forks (7,599 forks)batch import
help wanted
Description
excel 实体
读取方式
Contributor guide
- Tech stack
- java
- Domain
- backend
- Issue type
- feature
- DifficultyEstimated implementation difficulty for a new contributor, from 1 for very small changes to 5 for expert-level work.
- 3
- Estimated timeA rough time range for an experienced contributor to investigate, implement, test, and prepare a pull request.
- 1-3 hours
- Activity statusHow available the issue appears right now: fresh, active, stale, blocked, or waiting on maintainer input.
- fresh
- ClarityHow clearly the issue explains the expected change, acceptance criteria, and next step.
- clear
- Prerequisites
- JavaEasyExcel basics
- Newbie friendlinessA 1-100 score estimating how approachable this issue is for first-time contributors.
- 50
- Research direction
- Investigate how EasyExcel maps Excel rows to entity objects by examining the annotation processing in the `com.alibaba.excel.annotation` package. Look at existing annotations like `@ExcelProperty` to understand the pattern. Consider adding a new annotation, e.g., `@ExcelRowNumber`, that automatically injects the current row number into the entity field, similar to how `@ExcelProperty` injects cell values. Review the `ReadListener` implementation to see how row numbers are currently accessible and design a solution that works without it. Check the project's contribution guidelines and existing issues (e.g., #4058) for any prior discussion.