autocomplete cg type

for cg type autocomplete is added in addition to fix of few bugs in
excel generation