EXCEL AUTOMATION ISSUE - Use excel file > Steps > Save Excel As [Not working]

Hi Team,

I am not sure what is wrong in my code:

Within Use excel file activity, I am trying to perform certain steps on all sheets of the excel file and save it as a different name for each iteration.
For Example:
Input: ----> Input.xlsx
Output: ------> Result_01.xlsx (derived from input file and saved as different xlsx file)
-----------------> Result_02.xlsx (derived from input file and saved as different xlsx file)
AND SO ON


Use Excel File

  • For each ObjIEnumerable
    • For each ListOfString
  • ---- Filter activity (Filter the sheets from the excel file based on certain logic) ---- this is working fine
    • For end ListOfString
    • Save Excel File As [Dynamic_ObjIEnumerable_Item_filepath.xlsx]
  • For End ObjIEnumerable

All code is running fine for me. Just in the last step, it is trying to save the file, but getting the error (Save Excel File As: COM object that has been separated from its underlying RCW cannot be used.)

Experts please help @ashokkarale @Yoichi @Anil_G

@hacky,

The excel file object is getting closed or modified in between. Try moving this Save Excel File As at the beginning and do the operations on the output file and just save it.