View Single Post
  #1   Report Post  
hywel
 
Posts: n/a
Default Creating single lines of data from a multi-column table

Hi folks.

I have a client who wants us to import data held as a grid in Excel
into our software as a csv file. The data is held as follows:

Job No Prod A Prod B Prod C
1234 6 7
1987 12
1545 12 2
etc

To work correctly the csv file needs to create the above as:

"1234","Prod A","6"
"1234","Prod B","7"
"1987","Prod C","12"
"1545","Prod B","12"
"1545","Prod C","2"

In other words: create a line per job/product combination
incorporating the Product code into the line. The table also includes
jobs without any data.

I've searched everywhere for this one - perhaps I am asking the wrong
questions! Any help gratefully received.

Hywel