using C# 編輯 Excel 元資料
using IronXL;
using System;

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
DateTime? creationDate = workBook.Metadata.Created;

// Read the last printed date of the excel file
DateTime? printDate = workBook.Metadata.LastPrinted;

workBook.SaveAs("editedMetadata.xlsx");
NuGet 下載
PM > Install-Package IronXL.Excel
using C# 編輯 Excel 元資料

using C# 編輯 Excel 元資料

透過使用C#和IronXL以程式化方式編輯Excel中繼資料,開發者可以無縫地更新或操作工作簿屬性,例如作者、標題、主題或自訂中繼資料欄位,而無需手動干預。 此功能在涉及自動化工作流程、大規模資料處理或與其他系統(如 SQL 資料庫)整合的場景中尤其有用。

IronXL透過支援常見的Excel格式如XLSX、XLS和CSV,使這個過程更有效率。 此功能最小化了手動工作量,並確保服務處理、審計或以元數據為中心的應用程序的準確性。 它簡化了 Excel 文件與後端系統之間的集成,從而實現了動態的、以元資料為中心的解決方案,能夠在真實的企業環境中有效擴展。

Explore How to Edit Workbook Metadata with IronXL
在 GitHub 查看

準備好開始了嗎?

NuGet 下載次數 2,407,307版本:2026.11剛剛發布