Forum Discussion

Adagio's avatar
Adagio
Frequent Contributor
7 years ago

Read data from spreadsheet based on Info in a column

Hello,   I'm trying read the following info from a spreadsheet by using a javascript code. For each ItemNum, I have to read the 'Related PIN' and do an operation. Once all the Related PINs are cove...
  • NisHera's avatar
    7 years ago

    below is what Marsha_R suggested in Java script code skeleton

    var RelatedPIN
    var ItemNum
    DDT.ExcelDriver("C:\\myfolder\\myData.xlsx","Sheet1",true);
      do
      {
        if (DDT.CurrentDriver.Value('ItemNum')!=null){
    		//set my item number
    		ItemNum = DDT.CurrentDriver.Value('ItemNum');
    		//and go inside item ... write some code to go into new item using ItemNum
    	}
    	RelatedPIN = DDT.CurrentDriver.Value('RelatedPIN');
    	// code for do an operation ...do what ever your operation
    
        DDT.CurrentDriver.Next(); 
      }
      while (!(DDT.CurrentDriver.EOF()));
      DDT.CloseDriver(DDT.CurrentDriver.Name);
    

    let us know any more help needed......