Managing Excel Worksheets Across Multiple Servers

A simple way of managing TM1 Excel worksheets across multiple server environments

Many larger companies using TM1 operate development, user testing and production environments with separately named TM1 server instances, for example; TM1_Dev,  TM1_Test and TM1_Prod.  Migrating TM1 server objects across servers is relatively straightforward as no object changes are required. However with reports and data entry templates developed in Excel it is usually a different matter as the server name reference will need to be replaced.  Often this is a tedious and manual job that involves a developer of admin manually opening files and performing a find and replace (or developing a VBA macro or windows script to automate this task.)  This violates the separation of environments principle as a report that has passed UAT must be changed  in order to function in production.

Well it doesn't have to be that way.  What follows is a simple method to share and promote workbooks between named servers with no requirement to find/replace server names at all.

All that is required is prior knowledge of the number of environments and the TM1 server name of each environment and the TM1User function.

Steps:

1.       For each environment have a cell or named range in the worksheet to hold the server name

2.       For each environment have a matching TM1User function linking to the appropriate cell containing the server name. If the user is connected to a server he function will return the TM1 client name, otherwise is will return an empty string

3.       Have a named range "pServer" which contains an IF test to see if the TM1User functions have returned values

4.       Replace any hardcoded server name references in TM1 formulas with pServer&":

 

The following two screen shots show the cells that are required and the formula logic:

Additional cells required

Note the highlighted cell is a named range called "pServer"

Formulas in each cell

Note in other TM1 Excel formulas (SUBNM, VIEW, TM1RptView, TM1RptRow, etc.) hardcoded server name strings are replaced with a reference to the pServer named range.

The workbook will now be capable of being passed between environments with no further need for any modifications. This technique is suitable for any customer using TM1 across multiple servers where each instance of TM1 is running under a separate TM1 server name.

 


Comments - 3
Login or Register to post comments for this article.
Email:
Password:
remember me
Forgot password?
Email:
Display name:
Email:
Preferred password:
CAPTCHA Image
Posted by Brett
On 10 February 2011, 4:15 pm

What happens if you are logged into 2 environments at the same time? Under this scenario I am guessing it would be dependant on your your if statement as to which one you got.

Posted by
On 2 March 2011, 2:46 pm

Yes - you could put it in the IF statement - to default to a specific one, if logged in to several environments.

I\'m not sure if this technique is well suited for environments where it might make sense to log in to multiple production environments simultaneously, however.

If a report only needs to be linked to a single server, then it is probably best, in general terms, for a user to be logged in to that single server to avoid confusion.

Posted by ScottW
On 10 March 2011, 8:17 am

This method is really designed for prod/dev or prod/test/dev setups representing in essence the same TM1 application server where you wouldn\'t (normally) be expected to be logged in to a prod and a dev server at the same time unless you were explicitly reconciling data between servers for example.

For multiple prod or dev servers representing different Tm1 applications you would just expand this technique and have more than one IF statement.

But yes you bring up a valid point that in the case of being logged on to multiple servers then the server name that the formula returns will depend on the ordering of the IF statement (which I intended to mention in the tip but got left out the final edit!) The ordering of the IF in the example given assumes that if the user is logged onto multiple servers then the preference will be dev then UAT then prod which I think is what would be preferable in most cases.