Skip to Main Content
Florida Virtual Campus (FLVC) Logo

Alma Analytics Resource Guide

This guide covers how to use the Alma Analytics platform to produce robust reports. Included are instructions on accessing the Oracle-based service as well as how to use its menu driven service to build custom reports.

Automating Alma Analytics for Librarians with VBA Macros for Excel and Power BI

by Hisham Makki on 2025-09-23T11:47:47-04:00 in Alma, Analytics, Reports | 0 Comments

Automating Alma Analytics for Librarians with VBA Macros for Excel and Power BI

This VBA macro streamlines the process of downloading and parsing XML reports from Alma Analytics via its REST API. It dynamically extracts column headers and row data, then populates them into an Excel worksheet—perfect for librarians looking to automate data retrieval and simplify reporting in Excel or Power BI. If you are new the Excel Developer, you may need to check these links first:

Features

  • Connects to Alma Analytics via REST API
  • Parses XML response using MSXML2.DOMDocument.6.0
  • Dynamically extracts column headers from XML schema
  • Populates data rows into Excel
  • Handles errors gracefully (HTTP and XML parsing)

     

Requirements

  • Microsoft Excel (with VBA support)
  • Alma Analytics API access
  • Valid API key and report path
  • Internet access

     

Installation

  • Open Excel.
  • Press Alt + F11 to open the VBA Editor.
  • Insert a new module.
  • Copy and paste the contents of ParseXMLWithDynamicHeaders.vba into the module.
  • Replace placeholders in the URL:
    • Your Analytics URL
    • Your report path
    • Your API key
  • Save the Excel workbook to a macro enabled file (*.xlsm)

     

Usage

Run the macro ParseXMLWithDynamicHeaders, the macro will:

  • Clear the first worksheet.
  • Send a GET request to the Alma Analytics API.
  • Parse the XML response. Extract column headers and data rows. Populate them into the worksheet.

     

Notes

  • The macro uses local-name() in XPath to handle XML namespaces.
  • If saw-sql:columnHeading is missing, it falls back to the name attribute.
  • Only the first worksheet (Sheets(1)) is used.

 

** AI used to build this page


More information


 Add a Comment

0 Comments.

  Subscribe



Enter your e-mail address to receive notifications of new posts by e-mail.


  Archive



  Return to Blog
This post is closed for further discussion.