A simple macro needs to be developed
There are two files attached:
2. Media-Clic :Output File
Every day I receive a file in CSV format which has numerous columns. So all I want is an output file like the one attached- Media-Clic.
The CSV file has many columns but we only require the Yellow ones.
How the final output will be developed,
Each line is a data of a customer who has purchased the product in COLUMN “AW” and the quantity he has purchased in Column “AZ”. Then we provide the customer with additional option to purchase 5 other products which we call UPSALE. If a customer except an up sale then it appears under “Upsell Product Sku #1” in column “BL”and the quantity is shown in Column “BO” under “Upsell Quantity #1”. And So on continues for other upsale products on COLUMN “BY CB CL CO CY DB DL DO.”
In the Output file if a customer has accepted any of the upsale product the all the data from order number ( A to J) will be repeated and then under “Product Sku #” we will put the upsale product name from Column “BL” and Quantity from “BO”
Well please understand all files may not have the same number of columns and the columns number may change and not remain the same as it completely depends on the Upsale. The maximum line in a CSV file is 1000 meaning 1000 orders and if no one has accepted any of the upsale then the file will have alot smaller number of columns the other columns will then not appear. Hence the file needs to be sorted with header names in CSV files.
Details I can explain Later