finish export to excel and pdf