Robust XL2STRUCT

Script now figures out how many devices are in each section so it can
rebuild easily when new data is added