I have multiple excel files, each having data for individual location in a folder(about 15 files), and I am trying to e-mail these files only to their specific location manager. I have another excel file(reference), which has the details of e-mails by location to be sent. Can any of you guide me on how can I achieve this task or what activities should I use for this purpose?
You should first get all your files to an array.
Dictionary. GetFiles(path) will give all the files in the location to an array. Then use a for each loop to loop through your files
You can access the content of the excel using excel related activities. If the location is mentioned in a specific cell all the time in all your files you can use the read cell activity. If its stored as rows use a read range and access the data
Next loop through your location data and use a switch activity to have the location conditions. Within each have your email send defined. I suggest to use a new workflow for the email sending and invoking it in each switch condition with the required parameters. This will reduce the code repetition as well
Just one more thing, will I need to use something like v-lookup to match the file name, with the name in reference file in order to get the email information ?