Tag Archives: csv

sql server Bulk insert csv with data having comma

Questions: below is the sample line of csv 012,12/11/2013,”<555523051548>KRISHNA KUMAR ASHOKU,AR”,<10-12-2013>,555523051548,12/11/2013,”13,012.55″, you can see KRISHNA KUMAR ASHOKU,AR as single field but it is treating KRISHNA KUMAR ASHOKU and AR as two different fields because of comma, though they are enclosed with ” but still no luck I tried BULK INSERT tbl FROM ‘d:\1.csv’ WITH (… Read More »

Saving to CSV in Excel loses regional date format

Questions: I have a .xls I need to convert to .csv The file contains some date columns. The format on the date is “*14/03/2001” which, according to Excel means the date responds to regional date and time settings specified for the OS. Opening in Excel you see: 20/01/2013 01/05/2013 Save as… CSV Open in notepad:… Read More »

Are there any CSV readers/writer libraries in C#? [closed]

Questions: Are there any CSV readers/writer libraries in C#? Answers: Try CsvHelper. It’s as easy to use as FastCsvReader and does writing also. I’ve been very happy with FastCsvReader in the past, but I needed something that does writing also, and wasn’t happy with FileHelpers. Reading: var csv = new CsvReader( stream ); var myCustomTypeList… Read More »

PHP Array to CSV

Questions: I’m trying to convert an array of products into a CSV file, but it doesn’t seem to be going to plan. The CSV file is one long line, here is my code: for($i=0;$i<count($prods);$i++) { $sql = “SELECT * FROM products WHERE id = ‘”.$prods[$i].”‘”; $result = $mysqli->query($sql); $info = $result->fetch_array(); } $header = ”;… Read More »