Thanks, your code worked well for me to export 500 ledgers automatically. Just added a check for file exists and all worked well.
Separate names with a comma.