Skip to main content
Hi - I have a larger OD matrix to the file shared below (too big for excel to handle) and would like to aggregate all the duplicate zones together (to produce the matrix shown in the 'summarised' tab. Would anyone be able to provide a solution/script in FME?

 

https://arup.sharefile.com/d-saeccd70feea46d6b

 

Thanks

 

 
Hi,

 

 

Here is a way to do it.

 

 

 

 

You need to be aware that the FME excellreader will add a order number to columns with sme name. To cope with this i added a stringsearcher and a NullAttributeValueMapper. Latter because the normal ValueMapper does not allow for regexp.

 

 

The csv can be converted to excell using a simple:

 

 

 

For automation you can call the latter at the end of the fomr workbench usiing a workspacecaller.

 

 

..for some reason the Excell reader fails to read coulmn 1022..hav'nt solved that yet, alas.

 

 
..i see, it 's a mistake on my part, will fix it later...
Hi,

 

 

Here is the orrect version.

 

(your sample has different attributes for rows and columns..)  I now keep the original row_names.

 

Also added a "totals" row to the sheet.

 

 

 

 

When written to excell (Csv2Excell)

 

 

 

 
Hi Gio

 

 

Thankyou so much ! I didnt expect anyone to go to so much effort. Much appreciated- this will be very handy for the future :)

 

 

Is there a way to show the script in a higher resolution? I can't make it out fully..

 

 

Thanks

 

Zoe
Never mind-sorted it out! I will test this out now 🙂
..added another statcalc for totals per row. Also inserted wsc for csv to excell:

 

 

 

 

result:

 

 

 

...ok..now back to work... 🙂

Reply