Project Description

A small handy little tool for reading, editing and saving csv files.



With this small .NET 2.0 dll you can do the following:

Edit cell contents
Retrieve cell contents
Get no of Columns
Get no of Rows
Save as XML
Save with a delimiter of your choice on saving.
Load the csv into memory and specify if the file has Headers or not and specify delimiter.

I wrote this this little dll as I thought this would come in handy for many developers like myself, this is my 1st release of a DLL I have written and would appreciate feed back of any kind, whether it be for enhancements or bugs.

I've added the following enhancements
Specify delimiter on loading the CSV file

Examples - VB.NET

Load CSV
Dim csv As New CSVData
csv.LoadCSV("c:\temp.csv", ",",True)

Edit Cell Value
Dim csv As New CSVData
csv.LoadCSV("c:\temp.csv", True)
csv.SetCell(1, 1, " ")

Get Cell Value
Dim csv As New CSVData
csv.LoadCSV("c:\temp.csv", True)
csv.GetCell(1, 1)

Get No Of Columns
Dim csv As New CSVData
csv.LoadCSV("c:\temp.csv", True)
MsgBox(csv.GetColumns)

Get No Of Rows
Dim csv As New CSVData
csv.LoadCSV("c:\temp.csv", True)
Msgbox(csv.GetRows)

Save CSV File
Dim csv As New CSVData
csv.LoadCSV("c:\temp.csv", True)
csv.SaveAsCSV("C:\test.csv", "|")

Save CSV File as XML
Dim csv As New CSVData
csv.LoadCSV("c:\temp.csv", True)
csv.SaveAsXML("C:\test.xml")

Delete Row
Dim csv As New CSVData
csv.LoadCSV("c:\temp.csv", True)
csv.DeleteRow(1)

Delete Column
Dim csv As New CSVData
csv.LoadCSV("c:\temp.csv", True)
csv.DeleteCoumn("1") ' if headers is set to true, pass Column Name



Last edited Apr 11, 2012 at 12:19 PM by steveoneill, version 7