added dynamic batch and download to excel