FileConversionLibrary 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FileConversionLibrary --version 1.1.0                
NuGet\Install-Package FileConversionLibrary -Version 1.1.0                
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="FileConversionLibrary" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FileConversionLibrary --version 1.1.0                
#r "nuget: FileConversionLibrary, 1.1.0"                
#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 FileConversionLibrary as a Cake Addin
#addin nuget:?package=FileConversionLibrary&version=1.1.0

// Install FileConversionLibrary as a Cake Tool
#tool nuget:?package=FileConversionLibrary&version=1.1.0                

File Conversion Library

This library provides functionality to convert CSV files to various formats such as XML, PDF, Word, Json and YAML.

Usage

CSV to XML Conversion

var converter = new CsvToXmlConverter();
converter.ConvertCsvToXml("path/to/input.csv", "path/to/output.xml");

CSV to PDF Conversion

var converter = new CsvToPdfConverter();
converter.ConvertCsvToPdf("path/to/input.csv", "path/to/output.pdf");

CSV to Word Conversion

var converter = new CsvToWordConverter();
converter.ConvertCsvToWord("path/to/input.csv", "path/to/output.docx");

CSV to YAML Conversion

var converter = new CsvToYamlConverter();
converter.ConvertCsvToYaml("path/to/input.csv", "path/to/output.yaml");

CSV to JSON Conversion

var converter = new CsvToJsonConverter();
converter.ConvertCsvToYaml("path/to/input.csv", "path/to/output.json");

XML to CSV Conversion

var converter = new XmlToCsvConverter();
converter.Convert("path/to/input.xml", "path/to/output.csv");

Notes

The CsvToXmlConverter, CsvToJsonConverter, CsvToPdfConverter, CsvToWordConverter, and CsvToYamlConverter classes read a CSV file, parse it, and write the content to an XML, JSON, PDF, Word, and YAML file respectively. The first line of the CSV file is assumed to be the header. The XmlToCsvConverter class reads an XML file, parses it, and writes the content to a CSV file. The XML file is assumed to be in the format produced by the CsvToXmlConverter. All classes handle errors such as file not found and invalid file format, and print an error message to the console.

Author

Bohdan Harabadzhyu

License

MIT

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.2.0 40 11/27/2024
1.1.0 85 6/8/2024
1.0.0 255 11/18/2023