Skip to content

asmak9/CSVLibraryAK.Core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 

Repository files navigation

C#.Net Core Import/Export CSV Library

CSVLibraryAK.Core provides CSV import and export feature in C#.NET Core using Datatable as primary data structure. You can install this library via Nuget packages. You can use this library into your any C#.NET Core 3.1 or above framework supported project that supports Datatable data structure. This library imports CSV file with or without header and with any number of columns into C#.NET Core Datatable structure. The import function will automatically detects the number of columns of the CSV file. Export method will export your data from C#.NET Core Datatable data structure to .csv format file.

Nuget Installation Version 1.0.0: https://www.nuget.org/packages/CSVLibraryAK.Core/

.NET Framework Supported Nuget Library: https://www.nuget.org/packages/CSVLibraryAK/

Copyright (c) Asma's Blog

Basic Usage

using CSVLibraryAK.Core;

// Initialization.
bool hasHeader = true;
string importFilePath = "C:\\import.csv";
string exportFilePath = "C:\\export.csv";

// Impot CSV file.
DataTable data = CSVLibraryAK.Import(importFilePath, hasHeader);

// Export CSV file.
CSVLibraryAK.Export(exportFilePath, data);

Examples

  1. Console Application .NET Core
  2. ASP.NET Core MVC Application
  3. WPF .NET Core Application



Like, Share, Support, Subscribe!!!

E-Store Bytezaar: https://www.bytezaar.com/