Close Application Activity, doesn't work properly

I’m looping through for each row in excel which is the excel is open till the end of iteration. for each iteration I exported spreadsheet from SAP that the spreadsheet is automatically open, and I want to close this excel only.

to achieve this, I’m using Close Application Activity and using variable to dynamically change the title of excel and it works, until one of my automation that use this logic doesn’t work as expected. it closes all opened excel which it’s shouldn’t.
why?

image

Hello @ibnu.alem

  • For Each Row (Excel)
    • Open SAP Spreadsheet

    • Export Data

    • Assign dynamicTitle = "Excel - " + DateTime.Now.ToString(“yyyyMMddHHmmss”) // Generate unique title

    • Close Application

      • Window Title: dynamicTitle
      • TimeoutMS: 10000 // Set an appropriate timeout in milliseconds

Thanks & Cheers!!!

it’s still close all the excel which it’s shouldn’t