Hi Forum,
Im reading the CSV file, and want to find the content on a Cell, which is is below the content "retail" in a header row, and referring the indesign file name which is present at the last column, same row, of the content which is Im finding for.
Start Date | End Date | look and feel | Mechanic | Mathing | retail | Saving | Additional Messaging | RMS CODE | PA Code | INDD NAME |
17/09/2014 | 07/10/2014 | Value | Wanted | Yes | £1 | "Mr Muscle/Fairy" | 5213 | 818895 | 43126810 | |
17/09/2014 | 07/10/2014 | Normal | Wanted | Yes | £1 | SST | 5213 | 818884 | 43126811 | |
17/09/2014 | 07/10/2014 | Second | Wanted | Yes | £1 | SST | 5213 | 818890 | 43126812 | |
17/09/2014 | 07/10/2014 | Third | Not Wanted | No | £6 | SST | 5319 | 818936 | 43126813 | |
17/09/2014 | 07/10/2014 | Fourth | Single order | No | £1 | SST | 5369 | 818965 | 43126814 | |
17/09/2014 | 07/10/2014 | Fifth | Double order | No | £1 | SST | 5369 | 818968 | 43126815 |
var myFile = File("/Users/studio/Desktop/Workbook.csv");
if (!myFile){
exit();
}
myFile.open('r');
while (myFile.eof==false){
myFind=myFile.readln();
line2 =myFind.split(",");
line3 = line2;
myFile.close();
}
myFile.open('r');
while (myFile.eof==false){
myFile.readln();
line1=myFile.read();
line1 = line1.split(/['\,\r\n']+/);
NewmyFind = line1;
}
for(i=0; i<line3.length; i++) {
myFind4 = line3[i];
for(k=0; k<NewmyFind.length; k++) {
if(NewmyFind[k]=="43126812"){
if(myFind4 == "retail" && NewmyFind[myFind4.length-1])
{
var temp = i;
lineFinal = [];
lineFinal.push(NewmyFind[k][temp]);
alert (lineFinal);
}}}}
myFile.close();
Can anybody help on this please.
thanks