Code Not Working


Hi, I tried like this but not working correct me. First I shall say the contents of .txt files and .csv file.



.csv file content:


Header1,Header2,Header3


Row1Col1,Row1Col2,keywords1


Row2Col1,Row2Col2,keywords2


Row3Col1,Row3Col2,keywords3



2nd .txt file content (after parsing only keywords from 1st .txt file)


keyword1,keyword1,keyword1,keyword1,keyword1,keyword1,keyword1,keyword1,keyword1,keyword1,keyword1,keyword1,keyword1,keyword1,keyword2,keyword2,keyword2,keyword2,keyword1,keyword2,keyword1,keyword2,keyword1,keyword2



MODIFIED AND CREATED CODE:



Task: newCode


A1: Variable Set [


Name: %newline


To: 


Structure Output (JSON, etc): On ]


A2: Read File [


File: Download/CSV File Viewer/hi.txt


To Var: %textfile


Structure Output (JSON, etc): On ]


A3: Variable Search Replace [


Variable: %textfile


Search: \bkey\w*\b


Ignore Case: On


Store Matches In Array: %storedtextkeys ]


A4: Write File [


File: Download/CSV File Viewer/antextbig an.txt


Text: %storedtextkeys()


Add Newline: On ]


A5: Read File [


File: Download/CSV File Viewer/antextbig an.txt


To Var: %textfilewithkeys


Structure Output (JSON, etc): On ]


A6: Variable Search Replace [


Variable: %textfilewithkeys


Search: ,


Replace Matches: On


Replace With: %newline() ]


A7: Write File [


File: Download/CSV File Viewer/antextbig an.txt


Text: %textfilewithkeys


Add Newline: On ]


A8: Read File [


File: Download/CSV File Viewer/2010.csv


To Var: %csvfile


Structure Output (JSON, etc): On ]


A9: Read File [


File: Download/CSV File Viewer/antextbig an.txt


To Var: %textfilewithkeys


Structure Output (JSON, etc): On ]


A10: Flash [


Text: %textfilewithkeys


Continue Task Immediately: On


Dismiss On Click: On ]


A11: Variable Set [


Name: %to_search


To: %textfilewithkeys.keyword(+/)


Structure Output (JSON, etc): On ]


A12: Stop [ ]


If [ %csvfile.header3(#?%to_search) eq 0 ]


A13: Array Set [


Variable Array: %indexes_of_matches


Values: %csvfile.header3(#?%to_search)


Splitter: , ]


A14: Variable Set [


Name: %first_match


To: %indexes_of_matches(1)


Structure Output (JSON, etc): On ]


A15: Variable Search Replace [


Variable: %csvfile


Search: \Q%csv_data.Header1(%first_match),%csv_data.Header2(%first_match),%csvfile.Header3(%first_match)\E


Replace Matches: On


Replace With: $0,find ]



Comments

Popular posts from this blog

If Statement Not Working and Splitter ',' within the FOR loop also not working.