10.1 安装 Excel 插件
TDengine IDMP Excel 插件让您能够直接在 Microsoft Excel 中检索时序数据和元素属性,无需编写任何代码或 SQL。
前提条件
HTTPS 要求
Excel 插件仅通过 HTTPS 连接 IDMP。安装前,请确保 IDMP 的 HTTPS 服务已启用且可访问(默认端口:6034)。
要启用 HTTPS,请在 IDMP 配置文件(application.yml)中添加以下内容:
quarkus:
http:
port: 6042
ssl-port: 6034
insecure-requests: enabled
ssl:
enabled: true
certificate:
files: /usr/local/taos/idmp/config/certbundle.pem
key-files: /usr/local/taos/idmp/config/privkey.pem
内置测试证书: IDMP 附带一个有效期为 3 个月的测试证书,绑定到域名 idmp.tdengine.net。该证书适用于评估和测试,不建议在生产环境中使用。
如果使用内置测试证书,请在客户端机器的 hosts 文件中添加以下条目(将 IP 替换为您的实际服务器地址):
192.168.1.100 idmp.tdengine.net
hosts 文件位置:
- Linux / macOS:
/etc/hosts - Windows:
C:\Windows\System32\drivers\etc\hosts
系统要求
| 要求 | 详情 |
|---|---|
| Excel 版本 | Excel 2016 及更高版本(Windows 或 macOS) |
| 权限 | Windows 上需要管理员权限 |
| Node.js | 启用日志记录时,Windows 上需要 Node.js 22.3 或更高版本 |
安装
- macOS
- Windows
打开终端并运行:
curl -LsSf https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/install.sh | sh -s install --force-close --url https://idmp.tdengine.net:6034 --enable-logging
将 https://idmp.tdengine.net:6034 替换为您的实际 IDMP HTTPS 地址。
参数说明:
| 参数 | 说明 |
|---|---|
--force-close | 安装期间强制关闭 Excel。运行前请保存工作内容。 |
--url | IDMP HTTPS 服务地址 |
--enable-logging | 启用安装和运行时日志记录 |
日志文件位置:~/Library/Containers/com.microsoft.Excel/Data/tdengine_eai.log
安装期间 Excel 将被强制关闭。运行命令前请保存所有已打开的工作簿。
以管理员身份打开 PowerShell 并运行:
powershell -ExecutionPolicy ByPass -c "& ([scriptblock]::Create((irm https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/install.ps1))) -Action Install -ForceCloseExcel -Url 'https://idmp.tdengine.net:6034' -EnableLogging"
将 https://idmp.tdengine.net:6034 替换为您的实际 IDMP HTTPS 地址。
参数说明:
| 参数 | 说明 |
|---|---|
-Action Install | 执行安装 |
-ForceCloseExcel | 安装期间强制关闭 Excel。运行前请保存工作内容。 |
-Url | IDMP HTTPS 服务地址 |
-EnableLogging | 启用安装和运行时日志记录 |
日志文件位置:C:\Users\<your-username>\AppData\Roaming\Microsoft\AddIns\VueOfficeAddin\Logs\tdengine_eai.log
PowerShell 必须以管理员身份运行。安装期间 Excel 将被强制关闭。运行命令前请保存所有已打开的工作簿。
启用和禁用日志记录
要单独切换日志记录状态(不重新安装):
- macOS
- Windows
# 启用日志记录
curl -LsSf https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/install.sh | sh -s enable-logging-only --force-close
# 禁用日志记录
curl -LsSf https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/install.sh | sh -s disable-logging-only --force-close
# 启用日志记录
powershell -ExecutionPolicy ByPass -c "& ([scriptblock]::Create((irm https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/install.ps1))) -Action EnableLogging -ForceCloseExcel"
# 禁用日志记录
powershell -ExecutionPolicy ByPass -c "& ([scriptblock]::Create((irm https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/install.ps1))) -Action DisableLogging -ForceCloseExcel"
卸载
- macOS
- Windows
curl -LsSf https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/install.sh | sh -s uninstall --force-close
powershell -ExecutionPolicy ByPass -c "& ([scriptblock]::Create((irm https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/install.ps1))) -Action Uninstall -ForceCloseExcel"
卸载时同样会强制关闭 Excel。运行卸载命令前请保存所有已打开的工作簿。









