CsvUtility 1.1.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package CsvUtility --version 1.1.5
NuGet\Install-Package CsvUtility -Version 1.1.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CsvUtility" Version="1.1.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CsvUtility --version 1.1.5
#r "nuget: CsvUtility, 1.1.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CsvUtility as a Cake Addin
#addin nuget:?package=CsvUtility&version=1.1.5

// Install CsvUtility as a Cake Tool
#tool nuget:?package=CsvUtility&version=1.1.5

Book1.csv

abc def ghi fname fname 9 10,foo 11 first f2 2021/10/11 2,000 300 second f3

OR

"abc","def","ghi","fname","fname"

"9","10,foo","11","first","f2"

"100","2,000","300","second","f3"

using CsvUtility;

    Button open = new Button() { Parent = this, Text = "Open", Dock = DockStyle.Top, };
    open.Click += (sender, e) =>
    {
        var csvdata = CsvUtility.CsvFileV2.Open(".\\Book1.csv");
        var csvoutput = CsvUtility.CsvFileV2.Create(".\\Book1o.csv", csvdata.OriginalHeader);
        csvoutput.Delimiter = CsvUtility.eDelimiter.Tab;

        var cidx = csvdata.FindFirstUniqueHeaderColumnIndex("fname");
        var cname = csvdata.FindFirstUniqueHeaderColumnName("fname");
        MessageBox.Show(string.Format("fname index={0}, uniquecolumname={1}", cidx, cname));


        foreach (var line in csvdata.AllLines)
        {
            var l = line.Select(x => string.Format("Column={0}, Value={1}",
                x.Key, x.Value)).ToList();
            l.Add(string.Format("GetValueAsString({0})={1}", cidx, line.GetValueAsString(cidx)));

            var ret = MessageBox.Show(string.Join(Environment.NewLine,l.ToArray()) , "debug", MessageBoxButtons.OKCancel);
            if (ret == DialogResult.Cancel) break;

            line[cname] = DateTime.Today;
            csvoutput.AddLine(line);
        }

        foreach (var line in csvdata.AllLinesWithLineNumber)
        {
            var ret = MessageBox.Show(string.Join(Environment.NewLine,
                line.Value.Select(x => string.Format("Column={0}, Value={1}", x.Key, x.Value)).ToArray()), string.Format("Line={0}", line.Key), MessageBoxButtons.OKCancel);
            if (ret == DialogResult.Cancel) break;
        }

        if (csvdata.AllLines.Count > 0)
        {
            var line = csvdata.GetLineAsDic(0);
            var ret = MessageBox.Show(string.Join(Environment.NewLine,
                line.Select(x => string.Format("Column={0}, Value={1}", x.Key, x.Value)).ToArray()), "debug", MessageBoxButtons.OKCancel);
        }

        csvoutput.Save();
    };

    Button create = new Button() { Parent = this, Text = "Create", Dock = DockStyle.Top, };
    create.Click += (sender, e) =>
    {
        var csvdata = CsvUtility.CsvFileV2.Create(".\\createtest.csv", new[] { "columnA", "columnB", "columnC" });
        csvdata.AddLine("v11", "v12", "v13");
        csvdata.AddLine(
            new KeyValuePair<int, object>(0, "v21"),
            //                    new KeyValuePair<int, object>(1, "v22"),
            new KeyValuePair<int, object>(2, "v23"));

        csvdata.Save();

    };
Product Compatible and additional computed target framework versions.
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.3 106 1/23/2024
1.4.2 183 11/27/2023
1.4.1 107 11/26/2023
1.4.0 102 11/25/2023
1.3.0 148 7/16/2023
1.2.9 128 6/30/2023
1.2.8.1 310 11/15/2022
1.2.8 296 11/14/2022
1.2.7 346 10/8/2022
1.2.5 400 7/16/2022
1.2.4 413 7/10/2022
1.2.2 401 6/30/2022
1.2.1 393 6/18/2022
1.2.0 402 5/9/2022
1.1.8 403 4/16/2022
1.1.7 406 3/17/2022
1.1.6 412 2/16/2022
1.1.5 399 2/6/2022
1.1.4 399 1/21/2022
1.1.3 411 1/19/2022
1.1.2 406 1/18/2022
1.1.1 243 12/29/2021
1.1.0 272 11/23/2021
1.0.9 314 10/27/2021
1.0.8 292 10/18/2021
1.0.7 293 10/13/2021

1.1.5