EzDevInfo.com

CSV.js

A simple, blazing-fast CSV parser and encoder. Full RFC 4180 compliance.

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.


Source: (StackOverflow)

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";

Source: (StackOverflow)

Advertisements

Microsoft Excel mangles Diacritics in .csv files?

I am programmatically exporting data (using PHP 5.2) into a .csv test file.
Example data: Numéro 1 (note the accented e). The data is utf-8 (no prepended BOM)

When I open this file in MS excel is displays as Numéro 1

I am able to open this in a text editor (UltraEdit) which displays it correctly. UE reports the character is decimal 233.

How can I export text data in a .csv file so that MS excel will correctly render it, preferably without forcing the use of the import wizard, or non-default wizard settings?


Source: (StackOverflow)

How to create CSV Excel file C#? [closed]

I'm looking for a class for creating CSV Excel files.

Expected features:

  • Extremely simple to use
  • Escapes commas and quotes so excel handles them fine
  • Exports date and datetimes in timezone-proof format

Do you know any class capable of this?


Source: (StackOverflow)

How to use the CSV MIME-type?

In a web application I am working on, the user can click on a link to a CSV file. There is no header set for the mime-type, so the browser just renders it as text. I would like for this file to be sent as a .csv file, so the user can directly open it with calc, excel, gnumeric, etc.

header('Content-Type: text/csv');
echo "cell 1, cell 2";

This code works as expected on my computer (Isn't that how it always is?) but does not work on another computer.

My browser is a nightly build of FF 3.0.1 (on linux). The browsers it did not work in were IE 7 and FF 3.0 (on windows)

Are there any quirks I am unaware of?


Source: (StackOverflow)

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", ...]["name2", "city_name2", ...]]

Any idea how I can export this to csv on the client side?


Source: (StackOverflow)

CSV parser/reader for C#? [closed]

is there a good and free implementation of CSV parser available under some liberal licence? Some counterpart of SuperCSV for Java, perhaps a port?


Source: (StackOverflow)

CSV File Imports in .Net [closed]

I realize this is a newbie question, but I'm looking for a simple solution - it seems like there should be one.

What's the best way to import a CSV file into a strongly-typed data structure? Again simple = better.


Source: (StackOverflow)

How can I read and parse CSV files in C++?

I need to load and use CSV file data in C++. At this point it can really just be a comma-delimited parser (ie don't worry about escaping new lines and commas). The main need is a line-by-line parser that will return a vector for the next line each time the method is called.

I found this article which looks quite promising: http://www.boost.org/doc/libs/1_35_0/libs/spirit/example/fundamental/list_parser.cpp

I've never used Boost's Spirit, but am willing to try it. But only if there isn't a more straightforward solution I'm overlooking.


Source: (StackOverflow)

How to export query result to csv in Oracle SQL Developer?

I'm using Oracle SQL Developer 3.0. Trying to figure out how to export a query result to a text file (preferably CSV). Right clicking on the query results window doesn't give me any export options.


Source: (StackOverflow)

Parsing CSV files in C#

Is there a default/official/recommended way to parse CSV files in C#? I don't want to roll my own parser.

Also, I've seen instances of people using ODBC/OLE DB to read CSV via the Text driver, and a lot of people discourage this due to its "drawbacks." What are these drawbacks?

Ideally, I'm looking for a way through which I can read the CSV by column name, using the first record as the header / field names. Some of the answers given are correct but work to basically deserialize the file into classes.


Source: (StackOverflow)

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.


Source: (StackOverflow)

How to read a CSV file into a .NET Datatable [closed]

How can I load a CSV file into a System.Data.DataTable, creating the datatable based on the CSV file?

Is there a class library for this or can I use ADO.net to connect to the file?


Source: (StackOverflow)

converting CSV/XLS to JSON? [closed]

Does anyone know if there is application that will let me covert preferably XLS to JSON?

I'll also settle for a converter from CSV since that's what I'll probably end up having to write myself if there is nothing around.


Source: (StackOverflow)

Reading CSV file and storing values into an array

I am trying to read a *.csv-file.

The *.csv-file consist of two columns separated by semicolon (";").

I am able to read the *.csv-file using StreamReader and able to separate each line by using the Split() function. I want to store each column into a separate array and then display it.

Is it possible to do that?


Source: (StackOverflow)