Hello, I’m Trying to make a project to read text files from a folder, check see if the files Contain word “Invoice” if yes Copy the Invoice number and the file Name from the folder and put them in a data table then extract them to a excel file.
I think I got most of them flow correct but there is an error I cannot resolve,
when I’m trying to Add Data Row, I’m getting this error:
What is the error you are getting… @Pour_Medi when executing the write range workbook activity
In write range workbook activity give the path of the excel file, give the sheet name and pass the InvoiceFiles datatable variable to it. Check the add headers option in properties.
Don’t use the write range workbook activity inside the for each activity. You should place it outside the for each activity.
Then try it will work. When you place inside for each it overwrite the data in the excel everytime. If you place at outside of for each it will write all the data in InvoiceFiles to Excel.