So, I’m having a little in merging two excel files, I will try to explain the automation process. First the Robot downloads both files (they’re sales files) since the beginning of the month, so both files are continuosly growing on lines. I want to merge those two files into a single one so I can paste it on my database, however, all the methods I’ve tried have failed, since they mostly overlap each other instead of one below another.
I’ve read forums, I’ve tried ChatGPT but to no success. I’m currently using Read Range (the Excel activity) on the columns that data is stored, saving it on a System.Data.Datatable variable and Write Datatable to Excel on the first one (this one goes without problem, since the file is empty), but the second one I’ve tried using Write Datatable to Excel but it overlaps with the data already there, I’ve tried using Append Range but it says ‘Error BC30512. option strict on disallows implicit conversions from datatable to readrangeref’
→ Use Read Range Workbook to read both the excels and store the output in Datatables say dt1 and dt2 .
→ Create a new datatable variable and clone it headers
dt_Final = dt1.Clone()
→ Use Merge DataTable activity give source as dt1 and destination as dt_Final. in the same way do it for dt2 also.
→ Use Write Range Workbook to write dt_Final back to excel.