• 183 views | 3 messages Discussion: LEAP
    Topic: Exporting Summaries (LEAP API)Subscribe | Previous | Next
  • Andre Siqueira 9/16/2019

    Hello Everyone,

    There are good functions that we can easily export data from LEAP to Excel, such as ExportResults, ExportEnergyBalance. I'm developing a code using VBA that needs to import Summaries information. Since I didn't find any available function for that, I started to code in order to export it from LEAP.

    I didn't find a discussion about it but I'm using this code as a base:
    https://www.energycommunity.org/default.asp?action=9&tid=3729&fid=22

    Does anyone have an advice for me?

    Thank you!
  • Emily Ghosh 9/20/2019
      Best Response

    1 Like

    Hi Andre,

    The data in Summaries View could be reproduced using the code from the link you referenced in your post. You'll need to make changes to the following lines based on the result that you need:

    • Line 21: change the branchtype
    • Line 61: change the variable and units
    Thanks,
    Emily

  • Andre Siqueira 9/20/2019
      Best Response

    Hi, Emily!

    Thank you for your response.

    Attached is the View I would like to export to excel. I'm working on the code, but is not clear for me the branchtype I should use. I tried to use another integer values, such as "1=DemandCategoryBranchType", no success thought. My main goal is to export the "Cost of Avoiding GHGs" for each scenario.

    Thank you again!

    Summaries.View.PNG