name: excel-sync-bitable description: Safely import Excel/CSV data into a new or existing Feishu Base, or export a Base table to Excel/CSV. Use when a user needs Excel/CSV and Feishu Base synchronization, especially keyed upserts with a preview and post-write verification.
Use scripts/excel_sync_bitable.py. Require an explicit --apply before any Base write.
lark-cli auth status if the user identity or permission is uncertain.base +url-resolve.Preview a keyed sync (no write):
python scripts/excel_sync_bitable.py sync --input .\orders.xlsx --url "https://example.feishu.cn/base/..." --key "订单号"
Apply the reviewed sync and read back its keys:
python scripts/excel_sync_bitable.py sync --input .\orders.xlsx --url "https://example.feishu.cn/base/..." --key "订单号" --apply
Handle source columns that do not exist in the target Base:
# Show missing fields and their inferred types (default; no write)
python scripts/excel_sync_bitable.py sync --input .\orders.xlsx --url "https://example.feishu.cn/base/..." --key "订单号"
# Intentionally ignore absent columns
python scripts/excel_sync_bitable.py sync --input .\orders.xlsx --url "https://example.feishu.cn/base/..." --key "订单号" --missing-fields skip --apply
# Create absent text/number/datetime/checkbox fields, then import
python scripts/excel_sync_bitable.py sync --input .\orders.xlsx --url "https://example.feishu.cn/base/..." --key "订单号" --missing-fields create --apply
Create a Base from a workbook:
更多技能请访问小葱技能站7w4.net。
python scripts/excel_sync_bitable.py create --input .\orders.xlsx --app-name "订单数据" --table-name "订单" --apply
Export one Base table:
python scripts/excel_sync_bitable.py export --url "https://example.feishu.cn/base/..." --table-name "订单" --output .\orders.xlsx
sync updates only records whose business key matches exactly; it does not delete remote records.--missing-fields skip or --missing-fields create --apply.--apply only after the user has confirmed the target and counts.这个工具整体质量较好,安全性设计突出——预览确认和写后验证机制能有效避免数据误操作。它支持Excel和CSV导入导出飞书表格,智能识别日期、数字、勾选框等数据类型。不足之处是支持的字段类型较少,人员选择、附件等特殊字段暂时无法处理,另外在数据量很大时的性能表现还有待验证。总体来说,对于常见的文本和数值同步场景,这个工具是比较可靠的选择。