public class CellReferenceUtil extends Object
CellReference
工具类,提供包括行号转行名称、列号转列名称等功能。Constructor and Description |
---|
CellReferenceUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
colNameToIndex(String colName)
根据表元的列名转换为列号
|
static String |
indexToColName(int index)
将Sheet列号变为列名
|
static org.apache.poi.ss.util.CellReference |
toCellReference(String locationRef)
将Excel中地址标识符(例如A11,B5)等转换为行列表示
例如:A11 -》 col:0,row:10,B5-》col:1,row:4 |
public static String indexToColName(int index)
index
- 列号, 从0开始public static int colNameToIndex(String colName)
colName
- 列名, 从A开始public static org.apache.poi.ss.util.CellReference toCellReference(String locationRef)
locationRef
- 单元格地址标识符,例如A11,B5Copyright © 2025. All rights reserved.