Nested for each: Excel file being used by another process

Hi all, am running an error where the process cant be carried out because said excel sheet/file is being used by another process. I’m currently running a nested for each (input folder directory>for each excel workbook in folder>for each excel sheet>then run automation). I suspect my current error is due to the overlapping of processes in my current workflow? But I’m not sure how to fix it, any help is appreciated to improve!

Close the excel file and try again

I’ve shut down all excel files but still encounter this error tbh…!

Oh, It’s you again. excelFile is just file path. Set ‘sheet’ at Read Range instead of ‘excelFile’.

Sorry I’m wrong.

Lmao thanks for your help! In that case if sheet is at read range, what do I input for the ‘SheetName’ instead? Currently its like this
Screenshot 2021-12-28 at 10.25.29 AM

Actually the error is your are reading excel again and again in for each activity it opens and close the file again and again … So that only error came

Put the read range acticity outside of for each activity and try again

You have to provide your excel sheet where you want to fetch data

However, if I wish to read range for each sheet again and again in order to perform my automation, wouldn’t placing the read range outside of the for each do away this process?

Try this.

  1. Move For Each into Excel Application
  2. Replace ‘ReadRange’ to ‘ExcelReadRange’
  3. Set datatable proper way

Hi,

Perhaps you should write as the following, for example.

Sequence.xaml (11.1 KB)

This is just a sample. Please modify it for your requirement.

Regards,

Thank you so much for your help!

Believe I’ve resolved this particular issue now, replacing it with excelreadrange helped! I’m encountering problems with my datatable now, but I think I’ll create a separate forum for that… thanks again!