ENH: add template to trypgen args and some minor cleanup in excel.py