Appending and excl sheet

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
dmann07
Posts: 7
Joined: Wed Aug 20, 2008 11:02 am
Contact:

Appending and excl sheet

Post by dmann07 » Wed Aug 20, 2008 11:25 am

Can I append and csv file?

I’ve got a macro searches company and returns a table, that I extract to cvs (SAVEAS TYPE=EXTRACT FOLDER=C:\Test FILE=test_080820_141507.csv). Then have a loop that loop that looks for another company and writes to the csv file. The problem is that it puts a new title every time.

Thanks

David

URL GOTO=https://xxx.com/
TAG POS=1 TYPE=A ATTR=ID:amenu8
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:Login ATTR=NAME:USER CONTENT=daivd
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:Login ATTR=NAME:PASSWORD CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:Login ATTR=VALUE:Login
TAG POS=1 TYPE=A ATTR=ID:amenu5
SET !DATASOURCE input.csv
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:SearchInpLoi01Form ATTR=NAME:company_code CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:SearchInpLoi01Form ATTR=VALUE:Search
TAG POS=7 TYPE=TABLE ATTR=TXT:* EXTRACT=TXT
'SAVEAS TYPE=EXTRACT FOLDER=C:\Test FILE=test_{{!NOW:yymmdd_hhmmss}}.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Test FILE=IsaSearch.csv
Hannes, Tech Support

Re: Appending and excl sheet

Post by Hannes, Tech Support » Mon Aug 25, 2008 9:34 am

The iMacros software appends by default.

In your script, two subsequent runs do probably not refer to the same filename because it is generated using a timestamp (and thus changes on every run).
my2testing
Posts: 21
Joined: Tue Oct 30, 2007 6:57 am
Contact:

Re: Appending and excl sheet

Post by my2testing » Tue Sep 09, 2008 8:29 am

Code: Select all

URL GOTO=https://xxx.com/
SET !EXTRACT_TEST_POPUP NO
TAG POS=1 TYPE=A ATTR=ID:amenu8
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:Login ATTR=NAME:USER CONTENT=daivd
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:Login ATTR=NAME:PASSWORD CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:Login ATTR=VALUE:Login
TAG POS=1 TYPE=A ATTR=ID:amenu5
SET !DATASOURCE input.csv
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:SearchInpLoi01Form ATTR=NAME:company_code CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:SearchInpLoi01Form ATTR=VALUE:Search
TAG POS=7 TYPE=TABLE ATTR=TXT:* EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=C:\Test FILE=IsaSearch.csv
SET !EXTRACT_TEST_POPUP NO
Post Reply