Demo-Extract-Table
From iMacros
Extract complete table with one command and save data to text file.
Version 6
VERSION BUILD=6000524 TAB T=1 TAB CLOSEALLOTHERS URL GOTO=http://www.iopus.com/imacros/demo/v5/extract.htm SIZE X=801 Y=602 TAG POS=1 TYPE=TABLE ATTR=TXT:<SP>CADCHFEURGBPJPYUSD* EXTRACT=TXT 'The SAVEAS statement was added manually to write the extracted table to a file 'The name of the file to store the extracted information to is specified with the FILE= attribute of the SAVEAS command 'The FOLDER=* attribute indicates that the default folder is used. You can specify another folder with FOLDER=c:\yourfolder SAVEAS TYPE=EXTRACT FOLDER=* FILE=mytable_{{!NOW:yymmdd_hhmmss}}.csv
Before Version 6
VERSION BUILD=3500107 'The name of file to store the extracted information is specified with the FILE= attribute of the SAVEAS command 'The FOLDER=* attribute indicates that the default folder is used. You can specify another folder with FOLDER=c:\yourfolder TAB T=1 TAB CLOSEALLOTHERS URL GOTO=http://www.iopus.com/imacros/demo/v5/index.htm ' 'Note: This macro can run in both, IM Browser and the IE-Plugin 'But the EXTRACT button to start the extraction wizard is only in the IM Browser ' TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/imacros/demo/v5/extract.htm ' 'The first seven tables are in the header of the page 'The 8th table is the list of currencies '=> Extract data of **9th** table (POS=9) on page EXTRACT POS=9 ELEM=0 ATTR=<TABLE* ' 'The SAVEAS statement was added manually to write the extracted table to a file '(The alternative way to get the extracted data is the Scripting Interface) SAVEAS TYPE=EXTRACT FOLDER=* FILE=mytable_{{!NOW:yymmdd_hhmmss}}.csv WAIT SECONDS=3 URL GOTO=http://www.iopus.com/imacros/home/msg/ok.htm
