merge with database and modify data to excel