Refactor excel_handler