모든 XLSX, XLS, XLSM, XLTX, CSV, 그리고 TSV 파일을 System.Data.DataTable로 변환하여 System.Data.SQL와 완전한 상호 운용성을 갖거나 DataGrid를 채우세요. 이 DataTable 객체는 테이블, 관계 및 제약 조건의 컬렉션을 포함할 수 있습니다.
DataTables를 내보내는 방법을 알아보세요.using IronXL;
using System;
using System.Data;
// Supported for XLSX, XLS, XLSM, XLTX, CSV and TSV
WorkBook workBook = WorkBook.Load("sample.xlsx");
// Convert the whole Excel WorkBook to a DataSet
DataSet dataSet = workBook.ToDataSet();
foreach (DataTable table in dataSet.Tables)
{
Console.WriteLine(table.TableName);
// Enumerate by rows or columns first at your preference
foreach (DataRow row in table.Rows)
{
for (int i = 0 ; i < table.Columns.Count ; i++)
{
Console.Write(row[i]);
}
}
}
Imports IronXL
Imports System
Imports System.Data
' Supported for XLSX, XLS, XLSM, XLTX, CSV and TSV
Dim workBook As WorkBook = WorkBook.Load("sample.xlsx")
' Convert the whole Excel WorkBook to a DataSet
Dim dataSet As DataSet = workBook.ToDataSet()
For Each table As DataTable In dataSet.Tables
Console.WriteLine(table.TableName)
' Enumerate by rows or columns first at your preference
For Each row As DataRow In table.Rows
For i As Integer = 0 To table.Columns.Count - 1
Console.Write(row(i))
Next
Next
NextImports IronXL
Imports System
Imports System.Data
' Supported for XLSX, XLS, XLSM, XLTX, CSV and TSV
Dim workBook As WorkBook = WorkBook.Load("sample.xlsx")
' Convert the whole Excel WorkBook to a DataSet
Dim dataSet As DataSet = workBook.ToDataSet()
For Each table As DataTable In dataSet.Tables
Console.WriteLine(table.TableName)
' Enumerate by rows or columns first at your preference
For Each row As DataRow In table.Rows
For i As Integer = 0 To table.Columns.Count - 1
Console.Write(row(i))
Next
Next
Next모든 XLSX, XLS, XLSM, XLTX, CSV, 그리고 TSV 파일을 System.Data.DataTable로 변환하여 System.Data.SQL와 완전한 상호 운용성을 갖거나 DataGrid를 채우세요. 이 DataTable 객체는 테이블, 관계 및 제약 조건의 컬렉션을 포함할 수 있습니다.
DataTables를 내보내는 방법을 알아보세요.NuGet 다운로드 수 2,407,307|버전:2026.11방금 출시
Office Interop의 번거로움 없이 필요한 Excel API를 사용하세요.