I have one function getTotByMonth in xls file, it is used to calculate total month by month. Ihave to put some condition for some product. to read the product I used below line var pl = plNode.selectSingleNode("root/select").getAttribute("pl");
function getTotByMonth(plNode,nam){
var total = 0;
var objectif = plNode.getAttribute("obj");
var mto = eval(plNode.selectNodes("mto"));
var pl = plNode.selectSingleNode("root/select").getAttribute("pl");
if (pl == "SP") {
//logic
}
}
In the javascript line getting below error in this line
source.selectSingleNode("root/select").setAttribute("pl",savePL);
Microsoft JScript runtime error 'selectSingleNode(...)' is null or not an object line = 100, col = 2 (line is offset from the start of the script block). Error returned from property or method call.
could you please help me to read the product value.