pseudo code for rows-columns conversion

good example for Multiple Rows Function; pseudo code to prepare gantt
chart data.