Discussion

61
Views
Close popover
Sulakkya Peiris (Sulakkya)
evonsys
Consultant
evonsys
LK
Sulakkya Member since 2015 14 posts
evonsys
Posted: September 13, 2020
Last activity: September 14, 2020

Suppress excel 'update links' warning- via script

When we open a workbook which contains links or references, we will get the following warnings.

Warning 1:

 Excel warning 1

To suppress, 

  • Go to File > Options, in the excel options dialog box, click advanced in the left pane, and then uncheck 'ask to update automatic links' under the general section, see screenshot:

Warning 1 fix

Warning 2:

Warning 2

To suppress, 

    1. Click Data > Edit Links,

warning 2 fix1

     2. In the Edit Links dialog box, click 'Startup Prompt' button at the bottom,

warning 2 fix2

     3. And then in the prompt, choose 'Don’t display the alert and don’t update automatic links'.

warning 2 fix3

===================================================================================

We can achieve the same via script. (please refer to the attached .txt file) 

Method parameters,

  • path - excel file path
  • workSheet - sheet number

public void hideLink(string path, int workSheet)

* Make sure to set, StartOnProjectStart = false on excel.

Script Automation

Note: Add this line before the namespace,  using myExcel = Microsoft.Office.Interop.Excel; 

 

***Edited by Moderator: Pallavi to change content type from Idea to Discussion***
Pega Robotic Process Automation 19.1 Robotic Process Automation Financial Services Robotics System Architect Developer Knowledge Share