Thank you so much @ppr
I am able to get my expected solution now.
Just one more thing. If i want to write each datatable to csv with the month name(for example june/july as per data) along with the file path then how to do that. Please refer the attachment.