public class ExcelUtil extends Object
| Constructor and Description |
|---|
ExcelUtil() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.poi.hssf.usermodel.HSSFSheet |
getSheetFromFile(String filename,
String sheetName) |
static String |
getValue(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int row,
int col) |
static Set<String> |
grabColumnValues(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int column,
boolean header,
boolean clean) |
static Set<String> |
grabColumnValues(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int column,
boolean header,
boolean clean,
SpreadSheetFilter f)
Gets all the strings from a column, possibly excluding header and possibly trimming and lowercasing
|
static List<String> |
grabColumnValuesList(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int column,
boolean header,
boolean clean) |
static List<String> |
grabColumnValuesList(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int column,
boolean header,
boolean clean,
SpreadSheetFilter f) |
static void |
main(String[] args) |
static void |
setFormula(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int row,
int col,
String value) |
static void |
setValue(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int row,
int col,
double value) |
static void |
setValue(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int row,
int col,
int value) |
static void |
setValue(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int row,
int col,
String value) |
public static org.apache.poi.hssf.usermodel.HSSFSheet getSheetFromFile(String filename, String sheetName) throws IOException
filename - sheetName - IOExceptionpublic static String getValue(org.apache.poi.hssf.usermodel.HSSFSheet sheet, int row, int col)
sheet - row - col - public static Set<String> grabColumnValues(org.apache.poi.hssf.usermodel.HSSFSheet sheet, int column, boolean header, boolean clean)
sheet - column - header - clean - public static Set<String> grabColumnValues(org.apache.poi.hssf.usermodel.HSSFSheet sheet, int column, boolean header, boolean clean, SpreadSheetFilter f)
sheet - column - header - true if it has a headerclean - if true it will trim and lowercase the stringspublic static List<String> grabColumnValuesList(org.apache.poi.hssf.usermodel.HSSFSheet sheet, int column, boolean header, boolean clean)
sheet - column - header - clean - public static List<String> grabColumnValuesList(org.apache.poi.hssf.usermodel.HSSFSheet sheet, int column, boolean header, boolean clean, SpreadSheetFilter f)
sheet - column - the index of the column to getheader - if there is a header row to be skippedclean - lower casef - public static void main(String[] args)
public static void setFormula(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int row,
int col,
String value)
sheet - row - col - value - public static void setValue(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int row,
int col,
double value)
sheet - row - col - value - public static void setValue(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int row,
int col,
int value)
sheet - row - col - value - public static void setValue(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int row,
int col,
String value)
sheet - row - col - value - Copyright © 2003–2023 UBC Michael Smith Laboratories. All rights reserved.