• htalerico
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

The robust method for getting sf.com information into an Excel spread-sheet automatically will be -- when it is available -- the use of the API through the COM toolkit.  For simpler usage, however, it would be nice to automate the Office Edition report refreshes in an Excel Macro.

While not documented, it can be done ...
To do this:

a) Establish a reference to sfdc.xla in your project:
     a1. open vba
     a2. select the VBAProject for your workbook
     a3. open the menu tools/references, find and check "SFDCExcelAddin"

b) Build your macro, calling appropriate entries. An example, which refreshes all the reports in a workbook:

  Sub MyRefresh()
     If Not (SalesForceDotCom.g_LoggedOn) Then SFDCExcelAddin.CommandBarRelated.login
     SFDCExcelAddin.CommandBarRelated.RefreshAll
     SFDCExcelAddin.CommandBarRelated.Logoff
  End Sub

You can explore the entries using "View/Object Browser"; select "SFDCExcelAddin" from the pull-down menu at the top left; click on classes and members, and look for information at the bottom.

Updated Aug 2005: to match the newer version of Office Edition. The objects changed; the old version used references to  "SalesForceDotCom", and did not have the "CommandBarRelated" qualification.

Message Edited by Scot on 08-04-2005 09:48 AM

  • May 18, 2004
  • Like
  • 0