This project is independent of ThingsBoard and is not affiliated with or endorsed by the ThingsBoard project. This version creates an Excel workbook rather than a long-format CSV.
- One worksheet per device
- One row per unique timestamp
- One column per telemetry key
- Blank cells where a key did not report at that exact timestamp
- UTC and local timestamp columns
- Filters and frozen headings
- Python 3.9 or newer
- openpyxl
- A ThingsBoard account permitted to view the devices and telemetry
Install the required package:
Windows: py -m pip install openpyxl
Linux/macOS: python3 -m pip install openpyxl
Windows: py thingsboard_export_excel.py
Linux/macOS: python3 thingsboard_export_excel.py
The script prompts for:
- ThingsBoard URL
- username and password
- device names or UUIDs
- start and end date/time
- telemetry keys
- output .xlsx filename
Device identifiers may be entered as:
Device XXXX
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Device XXXX|XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Exact device-name lookup normally requires tenant-level permission. A restricted account can use Name|UUID.
ThingsBoard telemetry fields can have different timestamps. The exporter creates a row for every unique timestamp and leaves cells blank where a field did not report at that exact instant. It does not silently carry old values forward.
If a device exceeds Excel's worksheet row limit, the exporter automatically creates additional worksheets for that device.
MIT License
Copyright (c) 2026 James Buckle
