Opening a Websheet object

To open a Websheet object with the URL API, use the location path to the websheet as organized in the TM1® Application folder.

Procedure

  1. Open TM1 Web and expand the Applications node to locate the websheet you want to open.
  2. Build a text string that represents the path to the websheet.

    Start the path with Applications/ and separate any sub-folders with the forward slash / symbol.

    For example: Applications/My Reports/Report_2014.xls

  3. Set the Workbook parameter in your URL to the path that you assembled.

    #Action=Open&Type=WebSheet&Workbook=Applications/My Reports/Report_2014

  4. Combine the parameters with the base URL to make a complete URL request.

Example

Copy and paste the following URL directly into the address bar of your web browser to see this example.

http://localhost:9510/tm1web/UrlApi.jsp#Action=Open&Type=WebSheet&Workbook=Applications/Planning%20Sample/Management%20Reporting/Actual%20v%20Budget&AdminHost=localhost&TM1Server=Planning%20Sample

The following JavaScript function loads a websheet into an iframe.


function loadWebsheet() {

   // Get a reference to an existing iframe that has this ID
   webSheet = document.getElementById("websheetId");

   // Assemble the URL and assign it to the iframe
   webSheet.src = baseUrl + "#Action=Open&Type=WebSheet
   &Workbook=Applications/Planning Sample/Management Reporting/Actual v Budget
   &AdminHost=localhost&TM1Server=Planning Sample";

};