@Helen Bucksey One way to achieve this would be to use the Excel Connector to create the worksheets, tables, columns, and rows required but this would be verbose considering you would have to loop over all the CSV data. Another way would be to send the CSV files to an Azure Function that could perform the merge with code.
But if the CSV files would do, you could just perform separate SQL queries and create CSV tables for each. You could even run them in parallel.