Export Import DataTable to Excel XLSX C# (Without Office)

This Free XLSX Library Will help you to Import or Export DataTable or DataGridView to Excel XLSX File
Using C# .NET , with no need to install Office.

Just Add the SmartArabXLSX Library to your C# Project Reference and Start using it.

How to use it:

       private void Examble ()
            //Init dataTable 
            DataTable mydatatable = new DataTable();
            mydatatable.Columns.Add("BirthDate", typeof(DateTime));

            mydatatable.Rows.Add(1, "Muhammad Khalifa", new DateTime(1904, 5, 1));
            mydatatable.Rows.Add(2, "Smart Arab", new DateTime(1960, 2, 2));
            mydatatable.Rows.Add(3, "Another One", new DateTime(2000, 5, 1));

            // Export DataTable 
            SmartArab.XLSXData.ExportDataTableToXLSX(mydatatable, "dd/MM/yyyy", "c:\\MyXlsFileName.xlsx");

            // Export DataGridView as You see it
            dataGridView1.DataSource = mydatatable;
            SmartArab.XLSXData.ExportDataGridViewToXLSX(dataGridView1, "c:\\MyXlsFileName.xlsx");

            // Import DataTable 
            dataGridView1.DataSource = SmartArab.XLSXData.ImportDataTableFromXLSX("c:\\MyXlsFileName.xlsx");

Download “Smart Arab XLSX” 1ACNzO – Downloaded 1500 times –


  1. Pingback: Otopay
  2. Pingback: Astropay
  3. Pingback: Cıvata
    1. I will add
      +Import XLSX to DataSet,
      + Import From Sheet ( Sheet Name )

      In the next release, Thank you for you feedback.

Leave a Reply

Your email address will not be published.