Excel a SQL a través de System.Data.DataSet
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]);
        }
    }
}
NuGet Download
PM > Install-Package IronXL.Excel
Excel a SQL a través de System.Data.DataSet

Excel a SQL a través de System.Data.DataSet

Convierta cualquier XLSX, XLS, XLSM, XLTX, CSV y TSV archivo a un System.Data.DataTable para una total interoperabilidad con System.Data.SQL o para poblar un DataGrid. Este objeto DataTable puede contener una colección de tablas, relaciones y restricciones.

Learn how to export DataTables in C# with our guide.
Ver en GitHub

¿Listo para empezar?

Nuget Downloads 2,362,812Versión:2026.11recién lanzado