Vinaydhi
8 years agoOccasional Contributor
Search method of FarPoint Spread
Hi,
I am searching a text in farpoint spread sheet by using:
bwSpread.Search(0,"300100",true,true,true,false,3,0, foundRowID, foundColID);
I am not able to get any value in foundRowID, foundColID although defined text "300100" exist in the sheet.
Please help.
It looks like foundRowID and foundColID are by-reference parameters, and JScript/JavaScript do not support passing parameters by reference.
A possible workaround is to install the OutParameterWrapper extension and call the Search method using this extension. In this case you should be able to get the values of by-reference parameters. The code would be like this:
var params = [0, "300100", true, true, true, false, 3, 0, 0, 0]; // The last two 0's are foundRowID and foundColID params = ConvertJScriptArray(params); // function code can be found at https://support.smartbear.com/viewarticle/42197/
var result = OutParameterWrapper.CallObjectMethod(bwSpread, "Search", params).toArray(); var foundRowID = result[8]; // 9th parameter of the Search method var foundColID = result[9]; // 10th parameter of the Search methodI don't have any FarPoint Spread apps so I can't test this code, but I hope it gives you the idea.