Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/miles-till/csv-merge

Simple tool to merge csv files.
https://github.com/miles-till/csv-merge

Last synced: about 1 month ago
JSON representation

Simple tool to merge csv files.

Awesome Lists containing this project

README

        

# CsvMerge

[![CsvMerge](https://img.shields.io/nuget/v/CsvMerge?logo=nuget&label=CsvMerge)](https://www.nuget.org/packages/CsvMerge)
[![CsvMerge.Core](https://img.shields.io/nuget/v/CsvMerge.Core?logo=nuget&label=CsvMerge.Core)](https://www.nuget.org/packages/CsvMerge.Core)
[![ci](https://github.com/miles-till/csv-merge/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/miles-till/csv-merge/actions/workflows/build.yml)
[![cd](https://github.com/miles-till/csv-merge/actions/workflows/publish.yml/badge.svg)](https://github.com/miles-till/csv-merge/actions/workflows/publish.yml)

Simple tool to merge csv files.

## dotnet tool

### Quick start

```sh
dotnet tool install -g CsvMerge
csv-merge *.csv --output merged.csv
```

### Arguments

```
Description:
CsvMerge

Usage:
csv-merge ... [options]

Arguments:
Glob search patterns for the csv files to merge.

Options:
--output The output result of merging csv files.
--filepath-field The header for the filepath field included in the merged csv file. [default: Filepath]
--working-directory The working directory to search for files in. []
--overwrite Overwrite output file if it already exists. [default: True]
--version Show version information
-?, -h, --help Show help and usage information
```

## Standalone executable

Download the latest version for your OS from [Releases](https://github.com/miles-till/csv-merge/releases).

See [Arguments](#arguments) above.

## Nuget package

CsvMerge tool available as a zero dependency Nuget package.

### Quick start

```sh
dotnet add package CsvMerge.Core
```

```C#
using CsvMerge;

string[] files = ["file1.csv", "file2.csv", "file3.csv"];
MergeOptions options = new() { Output = new FileInfo("merge.csv") };
await Merger.Merge(files, options);
```