Multiple schedules to excel, OPTIONAL: multiple files OR multiple sheets

I would like for my script to have an option to choose to export to 1 excel file with multiple sheets or to multiple excel files.
(For the export I would still like to copy from an existing file since we will make this a template containing a header with our office logo etc…)

I know I have to search for string and do an if/condition but I don’t know how to continue with the different export options…
A should be export to 1 file, B export to multiple files
(I also still need to fix the sheetnames to the schedulenames and also the filenames to the schedulenames… Any suggestions on how to do this in a ‘clean’ way are welcome)

Also the excel-file always opens automatically after export… Is there a way to turn this off?

Multiple Schedules to excel.dyn (121.3 KB)


I managed to get as far as exporting to a single excel with multiple sheets and the schedule name as the sheet name in excel.
I managed to generate multiple filepaths/copy my template multiple times to export to multiple excel-files and have the schedule names in the file-names.
Don’t know how to match the correct data to the correct filepath while exporting…

Also haven’t figured out how to incorporate the choice Sheets/files yet, I’m feeling it’s quite simple but I just can’t see it…

Multiple Schedules to excel.dyn (165.5 KB)

1 Like