Hi Team.
In our project, we are using an excel sheet which will be converted into Json. we are using a config file to map column like first column will be mapped to 0 and second column mapped to 1 and so on.
Our logic is mapping using column numbers which is causing problem when in between any column is deleted.
Is there any way to get column number using column name. ??
In the below code, we are sending property key which will hold column no but I would like send property key containing column and get column number.
/**
* Gets the int val from props.
*
* @Param propertyKey
* the property key
* @Return the int val from props
*/
public static int getIntValFromProps(String propertyKey) {
int colNum = -1;
// final String colNumStr = PropertiesHelper.fetchPropertyFromCache(propertyKey);
final String colNumStr = PropertiesHelper.fetchPropertyFromCache(propertyKey);
if (colNumStr != null && !"".equals(colNumStr.trim())) {
colNum = Integer.parseInt(colNumStr.trim());
}
return colNum;
}