9ff3ebb1 d86f 580b 25d1 b9d80bc831c9 - akesseler/Plexdata.CsvParser GitHub Wiki

CsvWriter.Write Method (IEnumerable(IEnumerable(Object)), String, CsvSettings, Boolean)

This method tries to write given values into given file.

Namespace: Plexdata.CsvParser.Processors
Assembly: Plexdata.CsvParser.NET (in Plexdata.CsvParser.NET.dll) Version: 1.1.3+d5bef99aa35461ce4bafadf0bf2c2aeca18044ea

Syntax

C#

public static void Write(
	IEnumerable<IEnumerable<Object>> content,
	string filename,
	CsvSettings settings,
	bool overwrite
)

Parameters

 

content
Type: System.Collections.Generic.IEnumerable(IEnumerable(Object))
The content array to be written to the CSV file.
filename
Type: System.String
The fully qualified path of the output file.
settings
Type: Plexdata.CsvParser.Processors.CsvSettings
The settings to be used to generate the output of the CSV file.
overwrite
Type: System.Boolean
If true, then a possible existing file is overwritten. Otherwise, an exception is thrown if a file with the same name already exists.

Exceptions

 

Exception Condition
ArgumentException This exception is thrown either in case of given values are invalid or if given filename is invalid.
InvalidOperationException This exception is thrown if overwrite mode is disabled and given file already exists or in case of given file could not be deleted. Another reason could be the case when property parsing fails.

Remarks

This method determines the file existence and performs file deletion if requested. Thereafter, the file content is handled by creating and processing a stream.

See Also

Reference

CsvWriter Class
Write Overload
Plexdata.CsvParser.Processors Namespace

⚠️ **GitHub.com Fallback** ⚠️