Micros · internal tooling

Active Directory to Excel reporting tool

A one-command Python tool that rebuilds a previously hand-maintained company spreadsheet straight from Active Directory over LDAP.

  • Automation
  • Python
  • Windows

01 Problem

The company needed a repeatable user report pulled straight from Active Directory in a specific existing spreadsheet layout, instead of maintaining it by hand.

02 Approach

Wrote a Python tool that connects to AD over LDAP with a service account, queries the relevant organizational units, and generates a styled Excel workbook grouped by department to match the established company format, with connection and OU settings exposed as configuration and CLI flags.

03 Stack

  • Python
  • ldap3
  • openpyxl
  • Active Directory / LDAP

04 Result

A one-command report that reproduces a previously manual document directly from the directory, covering roughly 100 users across about 10 organizational units.

05 What broke, and what fixed it

ad-excel-reporting/diagnostics 2 entries
  • Matched an existing format

    Output reproduces the established company layout, grouped by department — no retraining needed.

  • Configurable

    Connection and OU settings exposed as config and CLI flags rather than hardcoded.