I have a little situation here which might very simple for you.
Context:
I have 3 files : mobile.txt, contract.txt and name.txt
All files are formatted like each line should refer to the same line on the other files...
Exemple :
- mobile.txt
0606060606
0607070707
0608080808
- contract.txt
123654
456985
152364
- name.txt
John Doe
Miss 1
Mister 2
I would like a foreach like loop to extract line by line in a variable and create table as :
0606060606;123654;John Doe
0607070707;456985;Miss 1
0608080808;152364;Mister 2
Sure it's really simple for you. I only manage to store the entire file to a variable and it's not creating a table.
Cheers all.
Question #2 (updated after answering question #1) :
Hello this is working fine with this method Thank you guys.
I now have a file containing 115 lines like this thanks to you :
0606060606;123654;John Doe
0607070707;456985;Miss 1
0608080808;152364;Mister 2
I have another file containing this type of content :
Smart Pro 5h 3Go ;44,00
OCC-Remise sur Smart Pro 5h 3Go ;-17,60
Abonnement Options-accès international;00,00
Abonnement Options-Option Voyage;00,00
Abonnement Options-ILLIMITE INTRA CPTE;3,00
OCC-option illimité intra-compte offerte;-3,00
----------------------- Page 30----------------------
Smart Pro 5h 3Go ;44,00
OCC-Remise sur Smart Pro 5h 3Go ;-17,60
Abonnement Options-accès international;00,00
Abonnement Options-Option Voyage;00,00
Abonnement Options-ILLIMITE INTRA CPTE;3,00
OCC-option illimité intra-compte offerte;-3,00
----------------------- Page 31----------------------
Smart Pro 5h 3Go;44,00
OCC-Remise sur Smart Pro 5h 3Go ;-17,60
Abonnement Options-ILLIMITE INTRA CPTE;3,00
OCC-option illimité intra-compte offerte ;-3,00
----------------------- Page 32----------------------
Now i have to match them like :
Line 1 of file 1 is copied to the first content between the delimiters
Line 2 of file 1 is copied to the second content between the delimiters
Line 3 of file 1 is copied to the third content between the delimiters
The delimiter can be another string than the one presented with Page numbers.
I want this type of output in the final file :
0606060606;123654;John Doe;Smart Pro 5h 3Go ;44,00
0606060606;123654;John Doe;OCC-Remise sur Smart Pro 5h 3Go ;-17,60
0606060606;123654;John Doe;Abonnement Options-accès international;00,00
0606060606;123654;John Doe;Abonnement Options-Option Voyage;00,00
0606060606;123654;John Doe;Abonnement Options-ILLIMITE INTRA CPTE;3,00
0606060606;123654;John Doe;OCC-option illimité intra-compte offerte;-3,00
0607070707;456985;Miss 1;Smart Pro 5h 3Go ;44,00
0607070707;456985;Miss 1;OCC-Remise sur Smart Pro 5h 3Go ;-17,60
0607070707;456985;Miss 1;Abonnement Options-accès international;00,00
0607070707;456985;Miss 1;Abonnement Options-Option Voyage;00,00
0607070707;456985;Miss 1;Abonnement Options-ILLIMITE INTRA CPTE;3,00
0607070707;456985;Miss 1;OCC-option illimité intra-compte offerte;-3,00
0608080808;152364;Mister 2;Smart Pro 5h 3Go;44,00
0608080808;152364;Mister 2;OCC-Remise sur Smart Pro 5h 3Go ;-17,60
0608080808;152364;Mister 2;Abonnement Options-ILLIMITE INTRA CPTE;3,00
0608080808;152364;Mister 2;OCC-option illimité intra-compte offerte ;-3,00
I am stuck in a neverending loop...