everything working until excel output