I am trying to take multiple CSV files and merge them into one Excel workbook, but keeping each CSV file as its own sheet within the same workbook ((1)One Excel file/workbook, (3)three separate sheets). I am using a batch file to do it. The batch file I'm writing runs a python script I've written to download the CSV files, so would it be easier to create another python script for the batch file to run to create this single, multiple-sheet workbook? Any ideas on which would be easier and how it is done? It just feels like a mess now.
I have tried merging the 3 CSV files (they contain the same headers, just different data values for each) into one CSV file, but it just displays all of the data on a single sheet one listed after another without any label that tells you you're looking at another CSV file.
(I am just learning to code (started about a month ago) and the commented out parts are things I tried and didn't work)
::copy .\Output\*.csv .\Output\merged.csv
::"CLE_*"+"TOL_*"+"BUF_*" merged.csv
for /f "tokens=1-5 delims=/ " %%d in ("%date%") do set datevar=%%e-%%f-%%g
::for %%a in (*.xlsx) do start "" "%%a"
for %%a in (./Output/*%datevar%.csv) do start "C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE" "./Output/%%a"
::for /f "tokens=1-5 delims=/ " %%d in ("%date%") do start "C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE" ".\Output\*%%e-%%f-%%g.csv"
exit