public int findColIndex(Sheet st,String strHeadColContents) {
int intIndex = 0;
for (int i = 0; i st.getColumns(); i++) {
String strCon = st.getCell(i,0).getContents().toString().trim();
if(strHeadColContents.equals(strCon)) {
intIndex = i;
}
}
return intIndex;
}
public String getValueAt(Sheet st, int rowIndex, int colIndex) {
String strValueAt = "";
if(null != st.getCell(colIndex,rowIndex)) {
Cell cellUnit = st.getCell(colIndex,rowIndex);
if(null != cellUnit.getContents().trim()
&& !"".equals(cellUnit.getContents().toString().trim())) {