parent
ac6345e7ff
commit
cbc60f9a1b
@ -0,0 +1,32 @@
|
||||
package com.dsideal.base.Tools.Excel.Bean;
|
||||
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import com.dsideal.base.Tools.Excel.Util.ExcelUtil;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BeanSchool2019_CZ {
|
||||
|
||||
@ExcelProperty(index = 1) // B列
|
||||
private String schoolName;
|
||||
|
||||
@ExcelProperty(index = 3) // D列
|
||||
private String schoolType;
|
||||
|
||||
@ExcelProperty(index = 5) // F列
|
||||
private Integer schoolCount;
|
||||
|
||||
@ExcelProperty(index = 374) // NK列
|
||||
private String city;
|
||||
|
||||
@ExcelProperty(index = 375) // NL列
|
||||
private String district;
|
||||
|
||||
public static void main(String[] args) {
|
||||
// 测试字母标号转列索引
|
||||
String columnLetter = "NK"; // 示例输入
|
||||
int columnIndex = ExcelUtil.columnLetterToIndex(columnLetter);
|
||||
System.out.printf("字母标号 %s 对应的列索引是: %d%n", columnLetter, columnIndex);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue