finish export history to excel