.csv To .txt
Posted on 2014-09-26
Will any one help me with piece of code. it will be very great full ...as manually thing is very tidy.
What mi up to is copy certain data from .csv file - arrange - final result past to .txt file with name as .csv date.
There is all .csv files located at C:\Test\ &amp; I had created one WB called Data To Text.xlsm which term as mediator or say converter who converter .csv file data in to .txt. From Data To Text.xlsm WB Execute this procedure.
flow like this
Open Very First .csv File from location C:\Test\
Clear Data Range A2:H2 Till End (WB Data To Text.xlsm)
Copy Range A2 till End (In .csv) – Past to WB Data To Text.xlsm – A2
Copy Range K2 till End (In .csv) – Past to WB Data To Text.xlsm – B2
Copy Range C2:F2 till end (in .csv) - Past to WB Data To Text.xlsm – C2
Copy Range I2 till end (in .csv) - Past to WB Data To Text.xlsm – G2
Past This Formula in Data To Text.xlsm - Cell H2 “=A2&amp;", "&amp;"D"&amp;", "&amp;TEXT(B2,"yyyymmdd")&amp;", "&amp;C2&amp;", "&amp;D2&amp;", "&amp;E2&amp;", "&amp;F2&amp;", "&amp;G2” &amp; formula drop down till End.
Open New notepad
Copy H1 till End data from WB Data To Text.xlsm &amp; past to newly open notepad.
Save &amp; Close notepad with naming = WB Data To Text – Cell B2.(Location same as active WB)
Open 2nd .csv ….Step 2 continue till End
Run till last .csv completed.
See attached sample .csv file Data To Text.xlsm &amp; Final Result .txt File
Thank you Very Much