Read and write Excel file dynamically