Extract & Write CSV

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Tamilselvan
Posts: 75
Joined: Mon Mar 07, 2016 10:49 am

Extract & Write CSV

Post by Tamilselvan » Wed Oct 24, 2018 1:23 pm

iMacros for firefox free 10.0.2.1450,
Windows 10 version 1803
Firefox 61.0.2 (32 Bit)

Please help anyone...

In looping I am accessing csv (JobCard-No.csv) file do somthing.

Code: Select all

SET !DATASOURCE "C:\\Users\\acer\\Documents\\iMacros\\Datasources\\JobCard-No.csv"

I get following statement each record in Looping.

Code: Select all

TAG POS=1 TYPE=SPAN ATTR=TXT:Data<SP>Entered<SP>Successfully!
sometime some record missed so the above statement not get (i.e.)"Entered Successfully". then loop will continue.

For identification I need to extract the each statement ("Entered Successfully " )and write in existing csv. (JobCard-No.csv) file in specified columns and each rows (i.e.) i need in 6th column.

Kindly help me.
Thanks You...
chivracq
Posts: 8201
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extract & Write CSV

Post by chivracq » Wed Oct 24, 2018 1:53 pm

Tamilselvan wrote:

Code: Select all

iMacros for firefox free 10.0.2.1450,
Windows 10 version 1803
Firefox 61.0.2 (32 Bit)
Please help anyone...

In looping I am accessing csv (JobCard-No.csv) file do somthing.

Code: Select all

SET !DATASOURCE "C:\\Users\\acer\\Documents\\iMacros\\Datasources\\JobCard-No.csv"

I get following statement each record in Looping.

Code: Select all

TAG POS=1 TYPE=SPAN ATTR=TXT:Data<SP>Entered<SP>Successfully!
sometime some record missed so the above statement not get (i.e.)"Entered Successfully". then loop will continue.

For identification I need to extract the each statement ("Entered Successfully " )and write in existing csv. (JobCard-No.csv) file in specified columns and each rows (i.e.) i need in 6th column.

Kindly help me.
Thanks You...
You cannot indeed "directly" add a Column to an existing '.CSV' from iMacros...

One Option is to use some GoogleDoc that you then can access from your Macro in your Browser, in a second Tab for example.

Another Option is to "completely" recreate your '.CSV' with the 5 existing Cols + the new Col, with something like:

Code: Select all

SET !EXTRACT NULL
TAG POS=1 TYPE=SPAN ATTR=TXT:Data<SP>Entered<SP>Successfully! EXTRACT=TXT
SET Data_Success {{!EXTRACT}}

SET !EXTRACT {{!COL1}}[EXTRACT]{{!COL2}}[EXTRACT]{{!COL3}}[EXTRACT]{{!COL4}}[EXTRACT]{{!COL5}}[EXTRACT]{{Data_Success}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
Tamilselvan
Posts: 75
Joined: Mon Mar 07, 2016 10:49 am

Re: Extract & Write CSV

Post by Tamilselvan » Wed Oct 24, 2018 2:29 pm

Yes... Its working.... :D :D :D
Thank You so much....
chivracq
Posts: 8201
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extract & Write CSV

Post by chivracq » Wed Oct 24, 2018 2:41 pm

Tamilselvan wrote:Yes... Its working.... :D :D :D
Thank You so much....
You're welcome...! :D
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
Post Reply