IRONSOFTWAREHOME
从 Python 编辑 Excel 元数据
from ironxl import *

# Load the Excel workbook
workbook = WorkBook.Load("sample.xlsx")

# Set author
workbook.Metadata.Author = "Your Name"
# Set comments
workbook.Metadata.Comments = "Monthly report"
# Set title
workbook.Metadata.Title = "July"
# Set keywords
workbook.Metadata.Keywords = "Report"

# Read the creation date of the Excel file
creation_date = workbook.Metadata.Created

# Read the last printed date of the Excel file
print_date = workbook.Metadata.LastPrinted

# Save the workbook with edited metadata
workbook.SaveAs("editedMetadata.xlsx")
pip install ironxl
从 Python 编辑 Excel 元数据

从 Python 编辑 Excel 元数据

使用IronXL for Python以编程方式编辑Excel元数据,允许开发人员更新工作簿属性,例如subject或自定义元数据字段,而无需手动交互。 这在自动化工作流程、大规模数据处理或需要元数据驱动解决方案的集成场景中特别有用。

IronXL通过支持广泛使用的Excel格式如XLSX、XLS和CSV,使这一过程高效。该功能减少了手动工作量,并确保处理报告、审计或元数据驱动应用的团队的准确性。 它简化了Excel文件与后端系统之间的连接,支持在真实世界的Python环境中有效拓展的动态元数据更新。

探索如何使用IronXL for Python编辑工作簿元数据

准备开始了吗?

版本:2026.9刚刚发布

Key in blue circle

立即获取免费的 30 天试用版密钥

Your trial license will be sent to your email address

无任何限制。100% 解锁。无需信用卡。

bullet_checked无需信用卡或创建账户无任何限制。100% 解锁。无需信用卡。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
预约您的免费现场演示
Booking Badge

深受全球数百万工程师信赖

Iron Software 的客户徽标
获取您的无义务咨询
填写下面的表格或通过sales@ironsoftware.com
您的资料将始终保密。
深受全球数百万工程师信赖
Iron Software 的客户徽标
立即获取您的免费30 天试用密钥
无需信用卡或创建账户