📄 mocksheetcellfinder.java
字号:
package net.sf.jxls;
import java.util.List;
import java.util.Map;
import net.sf.jxls.controller.SheetCellFinder;
import org.apache.poi.hssf.util.CellReference;
/**
* @author Leonid Vysochyn
*/
public class MockSheetCellFinder implements SheetCellFinder {
Map cellsMapping;
public MockSheetCellFinder(Map cellsMapping) {
this.cellsMapping = cellsMapping;
}
public List findCell(String cellName) {
return (List) cellsMapping.get( cellName );
}
public List findCell(int rowNum, int colNum) {
CellReference cellReference = new CellReference( rowNum, colNum );
return (List) cellsMapping.get( cellReference.toString() );
}
public List findCell(String sheetName, String cellName) {
return (List) cellsMapping.get( cellName );
}
public List findCell(String sheetName, int rowNum, int colNum) {
CellReference cellReference = new CellReference( rowNum, colNum );
return (List) cellsMapping.get( cellReference.toString() );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -