Jump to content

Recommended Posts

Posted (edited)

 

I tried various methods to call the addins directly, We were able to use keynotes but we need a direct connection to the dodeca for auto refresh of the files.
 

#include <Excel.au3>
;Function to log errors to a File
Func LogError($errorMsg)
   FileWriteLine(@ScriptDir & "\error_log.txt", @Hour & ":" & @MIN & ":" & @sec & "-" &$errorMsg)
   MsgBox(16,"Error",$errorMsg)
EndFunc

;Function to connect to essbase and refresh specific cells

Func RefreshEssbaseData($excelFilePath,$serverName,$applicationName,$databaseName,$userName,$sheetNames)

   ;open excel application
   Local $oExcel=ObjCreate("Excel.Application")
   if not IsObj($oExcel) Then
      LogError("Unable to open Excel.")
      Exit
   EndIf
   $oExcel.Visible=True ;Making excel visible for debugging

   ;open the workbook
   Local $oWorkbook=$oExcel.Workbooks.open($excelFilePath)
   ConsoleWrite("Workbook opened successfully:" & $excelFilePath & @CRLF)
   If not IsObj($oWorkbook) Then
      LogError("Unable to open workbook" & $excelFilePath )
      $oExcel.Quit()
      Exit
   EndIf

local $bDodecainstalledInstalled=False
for $i=1 to $oExcel.CommAddIns.Count
   if StringInStr($oExcel.CommAddIns.Item($i).Name,"ApplieadOLAP.Dodeca.ExcelAddInForEssbase") then
      $bDodecainstalledInstalled=True
      Exit
   EndIf
   ConsoleWrite($bDodecainstalledInstalled & @CRLF)
Next

 

Edited by Jos
added codebox
Posted

This might be a good starting point: https://learn.microsoft.com/en-us/office/vba/api/excel.addin

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

I do not think you need to create a VBA macro.
In this (quite old) thread it seemed to work without VBA:

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...