Is there a good way to convert all references to a given server name in Datalink macros to a different server in a Excel spreadsheet?
Before replying, I created a couple of Datalink calculations to check the positioning of the server name within the expression.
Unfortunately, it is not always in the same place (in one calculation it was the 3rd position, in another, the 4th).
So, if the expressions have a hard-coded server name instead of a cell reference, try the following.
Set calculations to manual, so as replacements are made, they are not automatically executed!
Select all sheets by clicking on them at the bottom of the page, then ctrl-H (find and replace).
Put in the name of the 'old server' with "\\" preceding it and the 'new server' with the same "\\".
The "\\" should prevent inadvertent replacements.
If the server is referenced via a cell or just a handful of cells, try replacing them individually.
The above process should work as well, but, depending upon the size of the spreadsheet, may take a long time.
Macro reference : If you are using macro vba then you need to replace in VBA code.
Cell Reference : Similar to other replace functions.
Datalink Functions : Always use Root path to change server reference and set data items to attributes/PI Points.
Retrieving data ...