How to handle excel pop up when opening the excel files

You can try something like this:

On the click button activity, I set ContinueOnError to True and DelayBefore to 900ms.
Adjust which button you choose to click to your need.

Hope it helps! :grinning:

9 Likes

I tried this too to avoid using parallel activity but later found out that whenever there is any excel window opened then the update external link prompt will show up again.

i have the same issue any solution for that

please if any one solved this issue please update

this works, thanks

1 Like

You can try my answer above and see if it is applicable to you. Thanks.

Hi, I tried the above solution.

However I modified it to include a delay of 15 seconds, and then Element Exists because some files have the dialog and some files do not.

I added a dialog box to print out the true or false value whether it detected the popup.

What I found was that the popup to update data appeared, even after 1 whole minute or more, it waited for me to click “Don’t Update”, and only after the popup disappeared then I get the dialog box saying it did not detect the popup despite it clearly appearing on screen earlier. This is because the Element Exists only executes only after I click “Don’t Update” even when I place the activity sequence in parallel with Excel Application Scope.

How do I solve this issue?

Any help?

Hey There - In case you are using Invoke VBA inside Excel Application scope, add the below into your vba

ActiveWorkbook.UpdateLinks = xlUpdateLinksNever

1 Like

I would suggest in that case an easy way.

Before the excel application scope, use an Invoke code activity in which write a 2 lines of code to open that excel file and don’t close or quit the excel object created with the code.

Example

Dim xlsApp As Excel.Application = Nothing
Dim xlsWorkBooks As Excel.Workbooks = Nothing
Dim xlsWB As Excel.Workbook = Nothing
xlsApp = New Excel.Application
xlsApp.Visible = True
xlsWorkBooks = xlsApp.Workbooks
xlsWB = xlsWorkbooks.Open(“strExcelFilePath”,false)

1 Like

I’ve done this in powershell, since I prefer not to use WScript if possible.
The below script suppresses the update links question in two different ways - take a look and see which one suits you, or if you want to be super sure, you can use both.
This also ensures that the file is open for writes - check the Workbooks.Open syntax and update accordingly if you’d prefer it to open read only.

param(
	[Parameter(Mandatory = $true, Position = 1)]
	[string] $path
)

$excel = New-Object -ComObject Excel.Application
$excel.Visible = $true
$excel.DisplayAlerts = $false

# Globally suppress popup asking to update links (within current instance)
$excel.AskToUpdateLinks = $false

# Open the workbook
# Syntax and notes: https://docs.microsoft.com/en-us/office/vba/api/excel.workbooks.open
# Workbooks.Open(FileName, UpdateLinks, ReadOnly, Format, Password, WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable, Notify, Converter, AddToMru, Local, CorruptLoad)
# UpdateLinks is either 0 (do not update links) or 3 (update links)
$workbook = $excel.Workbooks.Open($path, 0, $false)
1 Like

I resolved it by following way:
Robot release precondition: Excel on customer’s machine must be configured. We need disable ‘Ask to update’ in Settings of installed Excel, and configure as ‘Always update links’, or as ‘Never update links’. If we choose ‘always’ a customer takes responsibility, that all files have not broken links.

1 Like

Hi DEATHFISH, the example I gave should works on both files with update link prompt and files wihout because the Click activity has ContinueOnError property set to True.

In your modified version where you added Element Exists activity, did u place it in the left side or right side of Parallel activity? I don’t know the exact underlying mechanism but despite the “parallel” in the name, from my experience the placement of the sequences do affect the execution hence I placed the Click activity in the left side.

2 Likes

This Worked perfectly for me. Thank you Nikoniko

This worked for me. Thank you!

Hi @Amrita_Mogali,

Hi tried to put excel application scope in parallel activity:

But it gets stuck and hangs until the pop up is handled:

Here, you can see that I can’t continue without selecting the option.

How do I solve this?

Best Regards,
Mahima

This solution works for me!!
Thank you Nikoniko!
You totally my angel!

Hi All,

Iam recently facing a new pop up in excel during the middle of the bot run and it is happening in most of the processes which Iam using . Please find the below screenshot . I have tried several ways from UiPath activities and also I have tried changing properties in excel and clearing cache .nothing has worked for me. I have also checked is the excel being opened by any user at the same time or is someone using it . apparently , no one is using it . But , when I tried closing manually and opening it again we Iam not facing the same issue , but after sometime Iam facing the same issue again even when we open manually or during the bot run

I have tried using local path , still Iam facing the same issue. can anyone please help me here to resolve the issue.

Thanks in advance.

@sabliao
@nikoniko

Can you send me you xaml file with the solution plz ?

Hi @Soudios ,

In the BalaReva.Easy.Excel package. It has the property to handle the display message. “Display Alert=False”.

Regards
Balamurugan.S