.NET Core代碼
using IronXL;
using System;
using System.Linq;
// Supported for XLSX, XLS, XLSM, XLTX, CSV and TSV
WorkBook workBook = WorkBook.Load("sample.xlsx");
// Select worksheet at index 0
WorkSheet workSheet = workBook.WorkSheets[0];
// Get any existing worksheet
WorkSheet firstSheet = workBook.DefaultWorkSheet;
// Select a cell and return the converted value
int cellValue = workSheet["A2"].IntValue;
// Read from ranges of cells elegantly.
foreach (var cell in workSheet["A2:A10"])
{
Console.WriteLine("Cell {0} has value '{1}'", cell.AddressString, cell.Text);
}
// Calculate aggregate values such as Min, Max and Sum
decimal sum = workSheet["A2:A10"].Sum();
// Linq compatible
decimal max = workSheet["A2:A10"].Max(c => c.DecimalValue);
using IronXL;
using System;
using System.Linq;
// Supported for XLSX, XLS, XLSM, XLTX, CSV and TSV
WorkBook workBook = WorkBook.Load("sample.xlsx");
// Select worksheet at index 0
WorkSheet workSheet = workBook.WorkSheets[0];
// Get any existing worksheet
WorkSheet firstSheet = workBook.DefaultWorkSheet;
// Select a cell and return the converted value
int cellValue = workSheet["A2"].IntValue;
// Read from ranges of cells elegantly.
foreach (var cell in workSheet["A2:A10"])
{
Console.WriteLine("Cell {0} has value '{1}'", cell.AddressString, cell.Text);
}
// Calculate aggregate values such as Min, Max and Sum
decimal sum = workSheet["A2:A10"].Sum();
// Linq compatible
decimal max = workSheet["A2:A10"].Max(c => c.DecimalValue);
Imports IronXL
Imports System
Imports System.Linq
' Supported for XLSX, XLS, XLSM, XLTX, CSV and TSV
Dim workBook As WorkBook = WorkBook.Load("sample.xlsx")
' Select worksheet at index 0
Dim workSheet As WorkSheet = workBook.WorkSheets(0)
' Get any existing worksheet
Dim firstSheet As WorkSheet = workBook.DefaultWorkSheet
' Select a cell and return the converted value
Dim cellValue As Integer = workSheet("A2").IntValue
' Read from ranges of cells elegantly.
For Each cell In workSheet("A2:A10")
Console.WriteLine("Cell {0} has value '{1}'", cell.AddressString, cell.Text)
Next
' Calculate aggregate values such as Min, Max and Sum
Dim sum As Decimal = workSheet("A2:A10").Sum()
' Linq compatible
Dim max As Decimal = workSheet("A2:A10").Max(Function(c) c.DecimalValue)Imports IronXL
Imports System
Imports System.Linq
' Supported for XLSX, XLS, XLSM, XLTX, CSV and TSV
Dim workBook As WorkBook = WorkBook.Load("sample.xlsx")
' Select worksheet at index 0
Dim workSheet As WorkSheet = workBook.WorkSheets(0)
' Get any existing worksheet
Dim firstSheet As WorkSheet = workBook.DefaultWorkSheet
' Select a cell and return the converted value
Dim cellValue As Integer = workSheet("A2").IntValue
' Read from ranges of cells elegantly.
For Each cell In workSheet("A2:A10")
Console.WriteLine("Cell {0} has value '{1}'", cell.AddressString, cell.Text)
Next
' Calculate aggregate values such as Min, Max and Sum
Dim sum As Decimal = workSheet("A2:A10").Sum()
' Linq compatible
Dim max As Decimal = workSheet("A2:A10").Max(Function(c) c.DecimalValue)
來自我們 .NET Core 團隊的技術支援
與我們的產品開發和支援團隊取得聯繫。我們的團隊隨時解答您有關許可證、產品和用於您的項目的使用的問題。
在 .NET Core 中處理 Excel 文件
在 dot net core 中快速簡單地處理 Excel 和其他試算表文檔。支援 dotnet core 的多個平台包括 Azure,無需額外依賴項或需安裝 MS Office 或 Interop。
開啟和保存多種文件格式
IronXL 允許 .NET 工程師從 dotnet Core 應用程式中寫入和匯出 Excel 試算表。打開並編輯 XLS/XLSX/CSV/TSV - 保存並匯出為 XLS/XLSX/CSV/TSV/JSON。在解析、更改和保存 Excel 文件方面,IronXL 的表現優於免費和 Interop 資料庫。
即時SQL支援
通過將試算表打開為 System.Data.DataSet 和 System.Data.DataTable 對象,在 Excel、SQL 和 GridViews 之間傳輸資料。
修改Excel資料
編輯 Microsoft Excel 公式 - 每次工作表更改時重新計算。簡單快速的 WorkSheet [“A1:B10”] 格式化。合併和設置範圍、欄和列。
設計您的 Excel 文檔
設置字體、大小、背景、邊框、對齊和數字格式。使用 Visual Studio 為 .NET Core 項目輕鬆構建
IronXL 與智能感應支援將 Excel 工具交到您手中。使用 NuGet 為 Visual Studio 安裝,或手動 DLL 下載 .NET Core 免費。在眨眼間您就能設置完成。支援:
.NET Core Excel 試算表教程

C#ExcelASP.NET

如何在 .NET Core 中創建 Excel 文件
看看 Jonas 如何使用 IronXL 在沒有使用 Office Interop 的情況下生成 Excel 文件...
查看 Jonas 的 Excel 文件生成教程
C#ExcelXLS


C#Excel資料

.NET Core 工程師使用 IronXL 進行...
會計和財務系統
- # 收據
- # 報告
- # 發票列印
業務數位化
- # 文件
- # 訂單與標籤
- # 取代紙張

企業內容管理
- # 內容製作
- # 文件管理
- # 內容分發

資料和報告應用
- # 績效追蹤
- # 趨勢映射
- # 報告

數千個公司、政府、中小型企業和開發人員都信任 Iron 軟體產品。
Iron 的團隊有超過 10 年的 .NET 軟體組件市場經驗。








準備好開始了嗎?
NuGet 下載次數 2,393,101|版本:2026.11剛剛發布









