Excel question

Hi,
I am pasting data into sheet1,sheet2, sheet3 etc. of an Excel file.
When I open Excel manually, it opens with sheet3 because, it was the last one worked on.
Is there a way I can make it open in Sheet1.

Thank you,

@A_Learner,

  1. Open the Excel file using Excel Process Scope.
  2. Use Click activity to open Sheet1
  3. Save the Excel File

Now it would open the First sheet when we reopen the file.

Thanks,
Ashok :slight_smile:

1 Like

How to open β€œSheet1” with click activity

Hi @A_Learner

Follow the below steps-
β†’ Use the Excel process scope activity inside of it insert the use excel file activity.
β†’ Give the path of the excel file to the use excel file activity.
β†’ Inside Use excel file activity insert the Select range activity and give any of the range like,

Excel.Sheet("Sheet1").range("A1:C3")

β†’ Then use the save excel file activity to save the file.

The above step will just go to Sheet1 and select the range what we give.

We are only performing actions on Sheet1. Generally, Excel saves and closes with the last active sheet. Therefore, when you reopen the file, it will open to Sheet1 since the last action was performed there.

Hope it helps!!

I did the above. But still after the bot is done, when I open the output excel file,
Sheet3 getting opened. I want it to open Sheet1.

Thank you,

@A_Learner,

This is the way:

Sample code:
ExcelWork.xaml (10.6 KB)

Thanks,
Ashok :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.