Back to index

QuickSaveCsv

QuickSaveCsv is for reading and writing csv files

Create

Creates an empty csv

C#
var csv = new QuickSaveCsv();

Load

A QuickSaveException is raised if the csv file fails to open or parse

Loads an exisitng csv from the specified path

C#
var csv = QuickSaveCsv.Load(path);

Save

A QuickSaveException is raised if the csv file fails to save

Save a csv file at the specified path. If the file already exists it will be overwritten

C#
csv.Save(path);

GetCellCount

A QuickSaveException is raised if the specified row does not exist

Gets the number of cells in the specified row. The row index is zero based

C#
csv.GetCellCount(row);

GetCell

A QuickSaveException is raised if the specified cell does not exist

Gets the value of the specified cell. The row and column indexes are zero based

C#
// Returns the value as a string by default csv.GetCell(row, column); // Pass a type argument to automatically convert the value csv.GetCell<int>(row, column);

SetCell

Value should be a string, number of boolean

Sets the value of the specified cell. If the cell already exists its value will be overwritten. The row and column indexes are zero based

C#
csv.SetCell(row, column, value);

DeleteRow

Deletes the specified row if it exists. The row index is zero based

C#
csv.DeleteRow(row);