Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to read multiple Excel/CSV file and write to another file.

avatar
Contributor
 
1 ACCEPTED SOLUTION

avatar
Super Guru

@Gaurav Jain

There are many ways to do it, however, assuming that you would use NiFi, you could build a flow starting with GetFile processor pointing to a folder where you have all your CSV files. Follow with MergeContent and PutFile processors.

Otherwise, it could be even simpler and without NiFi. If your files have the same structure and each has a header, then a simple shell script can extract the header from one file and remove the header from the others and just merge the content. You can easily do all this using sed unix command.

View solution in original post

3 REPLIES 3

avatar
Rising Star

I also have the same query as want the excel data to be inserted into my database but unable to find one.

avatar
Super Mentor

@Gaurav Jain

Please provide full use case and examples. It is difficult to provide assistance without the details. The more the better.

avatar
Super Guru

@Gaurav Jain

There are many ways to do it, however, assuming that you would use NiFi, you could build a flow starting with GetFile processor pointing to a folder where you have all your CSV files. Follow with MergeContent and PutFile processors.

Otherwise, it could be even simpler and without NiFi. If your files have the same structure and each has a header, then a simple shell script can extract the header from one file and remove the header from the others and just merge the content. You can easily do all this using sed unix command.