+ Reply to Thread
Results 1 to 2 of 2

Creating a connection to Analysis Services

  1. #1
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Creating a connection to Analysis Services

    I'm trying to learn how to create a connection via VBA to a external Financial Analysis database where I then can create a Pivot Table and run CUBE formulas from that connection.

    Currently, If I want to create a connection, I need to enter

    1. the url address. something like. https://someaddress/blah/blah.dll
    2. A username and password.

    I know after I do this, the connection creates an odc file and the connection is stored on the PC. After that I typically just tell Excel to create the connection only, and then I will add pivot table if needed and start building a spreadsheet with the CUBE formulas.

    I'm trying to perhaps make this easier for others where I may look to include the script in our XLAM add in file where the user would maybe be prompted for the password in creating the connection. Also, is there any to store the connection in the XLAM Add-in file itself and not in an odc file? Does that make sense?

    I'm just not sure even where to start in trying to create the connection.

    If it helps, I did export the odc file and can see this information. So I think I just need to learn how to turn into a script.

    Please Login or Register  to view this content.
    Any help is appreciated.

    Thanks,
    PT
    Last edited by ptmuldoon; 08-30-2019 at 08:02 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Re: Creating a connection to Analysis Services

    So I made some progress on this and could perhaps use a little help.

    I'm trying to check if 2 connections exist and if they do not, then add them. This is partially working but not quite correct. I know in testing if one connection exist, it is not adding the other one.

    I think also that I do need to check if any connections exist first (count). As attempting to loop and if no connections are found, they are never added?

    Please Login or Register  to view this content.
    EDIT. I caught an error where I using ThisWorkbook vs ActiveWorkbook. But now when I run the code, it will keep adding/duplicating the connection even though it already exists?

    I think I understand the logic/cause on why it is duplicating, but not sure about how to fix yet. I guess when it loops the connection names, the first loop will see it doesn't match one of the names, thus get's added.
    Last edited by ptmuldoon; 09-03-2019 at 12:49 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel 2003 & Add-in for Analysis Services
    By mmcardle in forum Excel General
    Replies: 0
    Last Post: 10-08-2010, 06:26 AM
  2. Excel Add-In for Analysis Services - What-If
    By ssauerw in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-17-2006, 04:08 AM
  3. Excel Add-in for SQL Server Analysis Services
    By Robin Krupp in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-28-2006, 12:20 PM
  4. [SOLVED] Excel Add-in for SQL Server Analysis Services
    By Robin Krupp in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-28-2006, 12:15 PM
  5. PivotTableWizard using SQL Analysis Services
    By Kam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2006, 03:00 AM
  6. Problem connecting to Analysis Services
    By ln54 in forum Excel General
    Replies: 1
    Last Post: 03-08-2006, 01:10 PM
  7. Issue with Excel Add-in for Analysis Services
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-18-2006, 09:45 PM
  8. Add-in for SQL Server Analysis Services
    By Hans Knudsen in forum Excel General
    Replies: 0
    Last Post: 08-28-2005, 04:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1