Hi @Anonymous
Whereas SQL Select is usually my preferable way of pulling data from Excel thanks to the ease of filtering, match etc, writing back I usually address with Write to excel @VJR suggested.
Not sure what logic you are building, so not sure if this will be of any help for you, but what you could do is:
Instead of two separate excel files, operate on 1 with 2 Sheets.
In such case you can open 1 SQL connection and each sheet is treated as a separate table, so you can then execute usually SQL goodies such as table JOINs etc.
But from what you wrote, you just need to pull data from file1, change column names, and paste it to file 2.
So I would use something like this:
1. SQL -> pull data from file 1, changing the column names to desired names at the same time, store it in %ExcelData% variable.
Select [Date] AS [DateAdded], [AnotherColumn] AS [AnotherColumnAddes]
FROM [SheetName$]
2. Excel action (not excel) -> Paste data to file2 in a way you want to structure data
If you need to paste the column headers, then write %ExcelData%.ColumnHeadersRow to the first row, and the %ExcelData% to row 2