Okay I have my csv builder essentially working. it has 3 columns. Name, Position, Date. Unfortunately right now the export has 4 columns. Last name, First name, position, date. This is because the data I get out of my data base for the name goes Last, First. Is there anyway I can easily change this delimiter? This would be very convenient haha.
Okay I have my csv builder essentially working. it has 3 columns. Name, Position,
Share
I’ve had to do this several times, and your best bet is to wrap your name. This does mean you’ll have to handle it separately (sort of).
Based on what I’m reading in your question, you’re pulling values from a DB that has three columns:
Name(LName, FName),Position, andDate. So your SQL Statement looks something like:SELECT Name, Position, [Date] FROM Table WHERE ...And you probably have a data reader somewhere.Based on those assumptions, I’d do this:
This will allow you to create a Pipe Delimited file (instead of CSV) and avoid having to escape commas.
If you must have csv, change that last
string.Formattowhich will escape the commas between LastName and FirstName.