imacro not reading .csv correctly

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
thenut
Posts: 1
Joined: Fri May 10, 2019 11:46 pm

imacro not reading .csv correctly

Post by thenut » Sat May 11, 2019 5:23 am

THIS IS DRIVING ME NUTS!

Right, so I have a .csv file, that I am trying to get imacros. In the .csv there is 5 columns, that look like this


SO 1ST ROW -

1A = NAME B = SURNAME C = AGE D = D.O.B E = Address


The imacro should read The First Name from row 1 in colum A.

The imacro should then read the surname from row 1 in column B

THE IMACRO IS NOT READING INDIVIDUAL COLUMNS, WHAT IT'S DOING, INSTEAD OF POSTING THE NAME FROM THE 1ST COLUM, IT IS POSTING THE ENTIRE ROW, WTH ALL THE INFO.

Code: Select all

VERSION BUILD=12.5.503.8802
CLEAR
SET !ERRORIGNORE YES
SET !DATASOURCE Test.csv
SET !DATASOURCE_COLUMNS 5
SET !LOOP 1
TAB T=1
TAB CLOSEALLOTHERS
'SET !PLAYBACKDELAY 0.00
WAIT SECONDS=0.5

HERE IS THE CODE FOR WHERE I AM TRYING POST THE FIRST NAME, FROM 1A OF THE .CSV SPREADSHEET.

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:firstName CONTENT={{!COL1}}

HERE IS THE CODE FOR WHERE I AM TRYING TO POST THE LAST NAME, WHICH IS IN ROW 1 BUT COLUMN B.

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:lastName CONTENT={{!COL2}}

etc, etc..


What the hell is wrong with my code ? Why does it post the ENTIRE ROW! So row 1 in columns A, B, C, D, E - It posts all the details, instead of individually. What am i doing wrong here? it feels like something so basic but its really starting to bug me out.

I am using the new version of firefox and imacros premium.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: imacro not reading .csv correctly

Post by chivracq » Sat May 11, 2019 2:00 pm

thenut wrote:
Sat May 11, 2019 5:23 am
THIS IS DRIVING ME NUTS!

Right, so I have a .csv file, that I am trying to get imacros. In the .csv there is 5 columns, that look like this

SO 1ST ROW -

Code: Select all

1A = NAME    B = SURNAME     C = AGE      D = D.O.B     E = Address

The imacro should read The First Name from row 1 in colum A.

The imacro should then read the surname from row 1 in column B

THE IMACRO IS NOT READING INDIVIDUAL COLUMNS, WHAT IT'S DOING, INSTEAD OF POSTING THE NAME FROM THE 1ST COLUM, IT IS POSTING THE ENTIRE ROW, WTH ALL THE INFO.

Code: Select all

VERSION BUILD=12.5.503.8802
CLEAR
SET !ERRORIGNORE YES
SET !DATASOURCE Test.csv
SET !DATASOURCE_COLUMNS 5
SET !LOOP 1
TAB T=1
TAB CLOSEALLOTHERS
'SET !PLAYBACKDELAY 0.00
WAIT SECONDS=0.5

HERE IS THE CODE FOR WHERE I AM TRYING POST THE FIRST NAME, FROM 1A OF THE .CSV SPREADSHEET.

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:firstName CONTENT={{!COL1}}

HERE IS THE CODE FOR WHERE I AM TRYING TO POST THE LAST NAME, WHICH IS IN ROW 1 BUT COLUMN B.

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:lastName CONTENT={{!COL2}}
etc, etc..

What the hell is wrong with my code ? Why does it post the ENTIRE ROW! So row 1 in columns A, B, C, D, E - It posts all the details, instead of individually. What am i doing wrong here? it feels like something so basic but its really starting to bug me out.

I am using the new version of firefox and imacros premium.
FCIM...! :mrgreen: (Read my Sig...)
Your FCI is not very "clear", as your Script mentions v12.5 which is a Version for iMB or iMacros for IE, while you later/also mention "firefox and imacros premium"... :?
And I don't know what "imacros premium" means...? You have iMB v12.5 'Pro'/'Trial' + iMacros for IE v12.5 ('Free') + iMacros for FF v10.0.2 'Free'/'PE'.

iMacros expects (by Default) the Data in your '.CSV' DataSource to be "CSV"-formatted like:

Code: Select all

NAME,SURNAME,AGE,D.O.B,Address
or

Code: Select all

"NAME","SURNAME","AGE","D.O.B","Address"
but not like your:

Code: Select all

1A = NAME    B = SURNAME     C = AGE      D = D.O.B     E = Address
+ For your FCI, mention also the Language of your OS and the Country for your OS 'Regional Settings' (I can't make an "educated guess" based on your IP as you registered to the Forum through a VPN/Proxy (GB - "Hydra")), will be relevant if you are using iMB or iMacros for IE.

>>>

Registering to the Forum through a VPN/Proxy was btw not "the best Idea" as those IP's are usually pretty "dirty" with Spam and regularly get banned if some Spammer(s) happen(s) to reuse the same IP on our Forum..., or several IP's from the same [0-255] IP-Range... :oops:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply