How to get data from different files ie .xlsm and .txt

hi Guys,
i want to do excel manipulation and for that i have 2 files one is .xlsm and second is .txt. i want some fields from .xlsm and two fields from .txt so for that i took two different for each row and one add data Row so it will print either excel full data and only last row from .txt.
but i want all excel and txt data i am little confuse.i will share u my .xaml.MACRO.xaml (31.6 KB)
i want tranc_date,amount,credit,debit,remarks,location name from .xlsm
and first and last no from text file ie cheque no and policy no

.xlsm file data is:

ACCT_NO DATE DESCRIPTION DEBIT CREDIT BALANCE
51096 21-Jun-19 BY ONL 5010016215-A JAI:: CA 51090051672:00530 6074.31 3270608.36
51096 21-Jun-19 BY ONL 501317597-SENTATHAN:: CA 1600161547:00167 22149.78 3292758.14
51096 21-Jun-19 BY ONL 5018052498-RAMISHNAN:: CA 0200147301:00020 3357.22 3296115.36
51096 21-Jun-19 BY ONL 513722-DHAMAN:: CA 172107870:00172 12967.06 3309082.42

.txt file data is:
0365055415|6074.31|06/21/2019 13:04:16|601744880
0365060163|3357.22|06/21/2019 13:57:59|602007045
0365082056|12967.06|06/21/2019 20:34:18|603340213
0365058374|22149.78|06/21/2019 13:37:49|601918982

@sayli
get the files from folder using Directory.getfiles(“Your folder path”) use for each to get one by one you can get the extension of the file using string manipulation, after that use if activity and put the condition YourextensionVar=“.xlsm” put the for each row in then section and take the read text file in the else section. and then you can put where you want to put the data.

1 Like