跳到主要内容

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 或更高版本

安装

打开终端并运行:

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。运行前请保存工作内容。
--urlIDMP HTTPS 服务地址
--enable-logging启用安装和运行时日志记录

日志文件位置:~/Library/Containers/com.microsoft.Excel/Data/tdengine_eai.log

注意

安装期间 Excel 将被强制关闭。运行命令前请保存所有已打开的工作簿。

启用和禁用日志记录

要单独切换日志记录状态(不重新安装):

# 启用日志记录
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

卸载

curl -LsSf https://taosinstallers.blob.core.windows.net/tdengine-excel-add-in/install.sh | sh -s uninstall --force-close
信息

卸载时同样会强制关闭 Excel。运行卸载命令前请保存所有已打开的工作簿。