I have sample csv format Order-34865510V-MincomCSV-edited.txt
that is used for purchase order to our company.
The problem is that file contains too many information that we don't need.
As you can see, there's no header information, the format (from our buyer) is:
- PO Header (with 94 fields <fields started with 0> separated by , (comma))
- PO Item 1 (with 42 fields separate by ,)
- PO Item 2 etc
Asterisk (*) is used to separate each item.
Comma (,) is used for data separation
" for encapsulation and escape character.
From that csv files, I just need
- PO Order Number (field 1 just after PO Header) in this case 34865510V
- Store number (field 27) in this case 0524
- GTIN number for each products (field 18 after *POITEM), for PO Product 1 : 2885730000005
- Weight of each products (field 6 after *POITEM), for Product 1 : 6
And considering I have so many purchase order, I'm thinking to put all csv files into the same folder and let the macro run through all csv files in that folder and after finished with it, move it to "processed" folder.
So in short,
- Need a macro to process all csv files in some directory (need user input for the directory name)
- Input the data into corresponding spreadsheets in the same workbook (Part 2)
- Move the processed csv files into a subfolder called "Processed on "today date""
Continue to part 2