Page 1 of 1

Run External Application from TM1Web Workbook

Posted: Fri Apr 01, 2011 12:52 pm
by yng
Hi gays!
Can anybody help me to resolve next task?
I need to open xls-file from TM1Web WorkSheet by MS Excel as external application.

Thanks for your advice.

yng

Re: Run External Application from TM1Web Workbook

Posted: Fri Apr 01, 2011 9:09 pm
by rkaif
What is the location of the Excel file you want to open? Is it on the TM1 Server?

Have you tried using the ExecuteCommand() function? You can use this function within your TI Process to run a desktop application.

Re: Run External Application from TM1Web Workbook

Posted: Sat Apr 02, 2011 7:16 am
by lotsaram
@Rizwan have a think about it, ExecuteCommand will run on the TM1 server, the OP is looking for a solution to something in the web client so this clearly isn't going to work.

@yng I don't think this is possible in a one step process as TM1 web is simply built to open excel files as websheets. A 2 step process is possible though: first hyperlink to open as websheet then export to open in excel.

Re: Run External Application from TM1Web Workbook

Posted: Sat Apr 02, 2011 5:09 pm
by rkaif
lotsaram wrote:@Rizwan have a think about it, ExecuteCommand will run on the TM1 server, the OP is looking for a solution to something in the web client so this clearly isn't going to work.
Yes, Lotsaram....thats why I asked OP about the location of the file....and I did said that ExecuteCommand will only run the desktop app.

Re: Run External Application from TM1Web Workbook

Posted: Sun Apr 03, 2011 2:05 am
by yyi
Hi gays!
Can anybody help me to resolve next task?
I need to open xls-file from TM1Web WorkSheet by MS Excel as external application.

Thanks for your advice.
I'm sorry but personally i'd like to be gay the way mrs brady describes it. :D
[in brady sequel]

Code: Select all

Sub xlObj0(xlCG As Boolean)
   If xlCG Then                                            '} if using existing xl
       xlApp.Visible = True                                '}
       xlApp.EnableEvents = True                           '}
       xlApp.DisplayAlerts = True                          '}
       Else                                                '}
       xlApp.Quit                                          '} quit if new xl created
   End If                                                  '}
   Set xlWkSh = Nothing
   Set xlWkBk = Nothing
   'Set xlApp = Nothing    'this also removes xl !?!
End Sub

Function xlObj1(pxlObj As String, pAlert As Boolean, pVis As Boolean, _
               pEvent As Boolean, Optional pWin As Integer = xlMinimized)
   Dim xlFound As Boolean, gErr As Boolean
   On Local Error GoTo xlERR                               'only sets xlobj
   Select Case pxlObj                                      '} get or create
    Case "c"                                               '}
     xlFound = False
     Set xlApp = CreateObject("excel.application")         '}
    Case "g"                                               '}
     xlFound = True
     Set xlApp = GetObject(, "excel.application")          '}
    Case Else                                              '}
   End Select                                              '}
   xlApp.DisplayAlerts = pAlert                            ' turn off app Dialogs
   xlApp.Visible = pVis                                    '}
   xlApp.EnableEvents = pEvent                             '}
   xlApp.WindowState = pWin
   xlObj1 = xlFound                                        'using existing or new xl
   Exit Function
xlERR:
   Debug.Print Err.Number; Err.Description
   If Err.Number = 429 Then                                '} 429 = ActiveX component can't
     Set xlApp = CreateObject("excel.application")         '} create object
     xlFound = False
   Else
     MsgBox Err.Number & " : " & Err.Description           '} diplay an unknown Error
     gErr = True                                           '} flag error to calling sub
     Exit Function
   End If
   Resume Next
End Function

Re: Run External Application from TM1Web Workbook

Posted: Tue Apr 05, 2011 5:49 am
by yng
Thanks all for answers.

I will explain more in detail, what task.

Users work in TM1Web through IE which start on the terminal server. Whether there is a method, from the input form (published WorkSheet) to start on the terminal server in session of the user other xls-file with data TM1, but already in "thick" MS Excel.

On a hyperlink the xls-file opens, but as WorkSheet in TM1Web. It, unfortunately, doesn't approach.

Thanks.

Re: Run External Application from TM1Web Workbook

Posted: Tue Apr 05, 2011 8:58 am
by lotsaram
yng wrote:Thanks all for answers.

I will explain more in detail, what task.

Users work in TM1Web through IE which start on the terminal server. Whether there is a method, from the input form (published WorkSheet) to start on the terminal server in session of the user other xls-file with data TM1, but already in "thick" MS Excel.

On a hyperlink the xls-file opens, but as WorkSheet in TM1Web. It, unfortunately, doesn't approach.

Thanks.
As explained TM1 web is doing this because that's what it is designed to do. You have 2 options, either be happy with a 2 setp process to first open the excel file as a websheet then use the export menu in TM1 web to open the file in Excel. Or you need to find the follow hyperlink java script function within your TM1 web directory and edit the function.