refactor xls and bar chart generator