Hello Experts,
I am looking for a way to create a new excel sheet if the file does not exist and append to existing file(also sheet) if the file is already present and write data to them .
For example,

We need to dynamically create a file called "test_exec. xlsx" if the flag is set as "0" and append to existing sheet if flag is set as "1"
Can somebody help me on this?
Thanks in advance 