Questions tagged [csv]

Comma-Separated Values or Character-Separated Values (CSV) is a standard "flat file database" format for storing tabular data in plain text, consisting of an optional header row that lists the table fields delimited by commas or tabs or other delimiter character, followed by one or more rows (...

1458
votes
43answers
1.8m views

How to concatenate text from multiple rows into a single text string in SQL server?

Consider a database table holding names, with three rows:PeterPaulMaryIs there an easy way to turn this into a single string of Peter, Paul, Mary?
913
votes
27answers
895k views

How to output MySQL query results in CSV format?

Is there an easy way to run a MySQL query from the Linux command line and output the results in CSV format?Here's what I'm doing now:mysql -u uid -ppwd -D dbname << EOQ | sed -e 's/ /...
663
votes
14answers
483k views

Save PL/pgSQL output from PostgreSQL to a CSV file

What is the easiest way to save PL/pgSQL output from a PostgreSQL database to a CSV file? I'm using PostgreSQL 8.4 with pgAdmin III and PSQL plugin where I run queries from.
514
votes
36answers
653k views

Excel to CSV with UTF8 encoding

I have an Excel file that has some Spanish characters (tildes, etc.) that I need to convert to a CSV file to use as an import file. However, when I do Save As CSV it mangles the "special" Spanish ...
464
votes
13answers
602k views

How to import CSV file data into a PostgreSQL table?

How can I write a stored procedure that imports data from a CSV file and populates the table?
415
votes
32answers
375k views

Stop Excel from automatically converting certain text values to dates

Does anyone happen to know if there is a token I can add to my csv for a certain field so Excel doesn't try to convert it to a date?I'm trying to write a .csv file from my application and one of the ...
407
votes
22answers
442k views

Dealing with commas in a CSV file

I am looking for suggestions on how to handle a csv file that is being created, then uploaded by our customers, and that may have a comma in a value, like a company name.Some of the ideas we are ...
346
votes
20answers
336k views

How to export JavaScript array info to csv (on client side)?

I know there are lot of questions of this nature but I need to do this using JavaScript. I am using Dojo 1.8 and have all the attribute info in array, which looks like this:[["name1", "city_name1", ....
343
votes
6answers
571k views

Pandas writing dataframe to CSV file

I have a dataframe in pandas which I would like to write to a CSV file. I am doing this using:df.to_csv('out.csv')And getting the error:UnicodeEncodeError: 'ascii' codec can't encode character u'...
321
votes
7answers
300k views

Dump a NumPy array into a csv file

Is there a way to dump a NumPy array into a CSV file? I have a 2D NumPy array and need to dump it in human-readable format.
312
votes
9answers
335k views

HTML Input=“file” Accept Attribute File Type (CSV)

I was hoping someone can help me out. I have a file upload object on my page: <input type="file" ID="fileSelect" />with the following excel files on my desktop:file1.xlsx file1....
307
votes
21answers
364k views

Is it possible to force Excel recognize UTF-8 CSV files automatically?

I'm developing a part of an application that's responsible for exporting some data into CSV files. The application always uses UTF-8 because of its multilingual nature at all levels. But opening such ...
291
votes
5answers
209k views

What MIME type should I use for CSV?

I've seen application/csv used and also text/csv.What's the difference? Is there a difference? Does it matter which as long as the request matches something that's available? Are they ...
287
votes
11answers
260k views

Response Content type as CSV

I need to send a CSV file in HTTP response. How can I set the output response as CSV format?This is not working:Response.ContentType="application/CSV";
221
votes
18answers
151k views

Command line CSV viewer?

Anyone know of a command-line CSV viewer for Linux/OS X? I'm thinking of something like less but that spaces out the columns in a more readable way. (I'd be fine with opening it with OpenOffice Calc ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,