Thank you for the reply.
Since I am writing to 5 Different folders, I need to create 5 differnt Excel destination connections.
I would like to have a solution to get a foldername dynamically and match to prefix of the ID. I don't want to create multiple Excel connections. Can you please give a solution to achieve this.