CSV to fields from another program Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
sebacote
Posts: 2
Joined: 17 May 2018, 13:34

CSV to fields from another program

17 May 2018, 13:44

Hi

I've used AHK in the past for some clicking, copy paste, windows switching, etc. but it's the first time I use it to read data from a file.

I have a file of names,numbers,email (1 line per person, infos separated by commas) in CSV (I also have it in XLS if it's easier that way).
I also have another program who has fields (A name field, A Last name field, email field, etc.).

I want to use AHK to make it press the "New" button, then the window with fields open, then it reads the first line from the CSV, write the correct infos in each fields, then press Save.
Rince and repeat for the other lines in the CSV.

I'm not quite good at programming, and I've searched this forum and the archive forum without any successful info for me.

Is someone here can help me?

Thanks!
User avatar
TLM
Posts: 1200
Joined: 01 Oct 2013, 07:52

Re: CSV to fields from another program

17 May 2018, 14:06

Can you please post any code you've already tried and also an example of the CSV file?
Thanks
Image Image Image
sebacote
Posts: 2
Joined: 17 May 2018, 13:34

Re: CSV to fields from another program

17 May 2018, 14:28

TLM wrote:Can you please post any code you've already tried and also an example of the CSV file?
Thanks


I don't have any code right now as I don't know where to start. I have the file in a plain Excel format, and also converted it in CSV. I can also use Excel to read cells if it's more easy.

I can't also show my CSV as it is sensible info, but I'll paste a sample with false data :

Code: [Select all] [Download] GeSHi © Codebox Plus

F1,2131,f1name@name.com,John Doe
F1,55311,f2name@name.com,Jane Doe
F2,7332,f3name@name.com,John Smith
F3,23451,f4name@name.com,Jane Smith
MaxAstro
Posts: 537
Joined: 05 Oct 2016, 13:00

Re: CSV to fields from another program  Topic is solved

17 May 2018, 15:03

This should be fairly easy to do with two loops, a file read loop and a CSV parse loop. Here is an example:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: apoklyps3, ouboss, Xtra and 34 guests