csv

Weird characters in exported csv files when converting

Hey guys, I came across a problem I cannot solve on my own concerning the downloadable csv formatted trends data files from Google Insights for Search. I'm to lazy to reformat the files I4S gives me manually what means: Extracting the section with the actual trends data and reformatting the columns so that I can use it with a modellin...

How can I pull a Google Doc spreadsheet into a PHP array?

Is it possible for me to access a Google Docs spreadsheet (possibly as a CSV file?) and build that into a PHP array? ...

Import csv data (SDK iphone)

I am new to cocoa. I have been working on these stuff for a few days. For the following code, i can read all the data in the string, and successfully get the data for plot. NSMutableArray *contentArray = [NSMutableArray array]; NSString *filePath = @"995,995,995,995,995,995,995,995,1000,997,995,994,992,993,992,989,988,987,990,993,989...

ASP.NET CSV Excel issue with strange characters

I'm exporting a table of data to CSV format, e.g.: "COL1","COL2","COL3" "1","some text", "£232.00" "2","some more text", "£111.00" "3","other text", "£2.00" The code to export is fairly simple using an ashx handler: context.Response.Clear() context.Response.ContentType = "text/csv" context.Response.AddHead...

How to validate csv file ?

How can we validate a CSV file ? I have an CSV file of structure: Date;Id;Shown 15-Mar-10;231;345 15-Mar-10;232;346 and so on and on !!! approx around 80,000 rows. How can I validate this CSV file before starting the parsing using fgetcsv ? ...

PHP Upload a CSV file

Hi, I want the following functionality using php I have a csv file. Each file corresponds to a row in my database There is a html form that will allow me to choose the csv file. Then once the form is submitted, I must parse the csv file and insert data into the db accordingly How do I go about doing this ? ...

How to check for whitespaces in CSV file ?

Currently I am using ctype_alnum to check for alphanumeric type in csv file. But one of my data has white spaces between them and so ctype_alnum gives me false. Example: ctype_alnum("Here is 23"); So my question is how can I check for white spaces in string in php ? ...

Dynamically generating a file with javascript?

I'm working on a web app for my company that will let us do some image tagging stuff, and I'd like to be able to generates results in the form of a CSV file. I can do this easily enough by dumping the CSV data to a div or something on the page and having the user copy it out. I'd rather have them hit the a generate button and have a CS...

Looping through columns in a .csv files in Python

I want to be able to use Python to open a .csv file like this: 5,26,42,2,1,6,6 and then perform some operation on them like addition. total = 0 with open("file.csv") as csv_file: for row in csv.reader(csv_file, delimiter=','): for number in range(7): total += int(row[number]) The problem is tha...

FIlling a Java Bean tree structure from a csv flat file

Hi, I'm currently trying to construct a list of bean classes in Java from a flat description file formatted in csv. Concretely : Here is the structure of the csv file : MES_ID;GRP_PARENT_ID;GRP_ID;ATTR_ID M1 ; ;G1 ;A1 M1 ; ;G1 ;A2 M1 ;G1 ;G2 ;A3 M1 ;G1 ;G2 ;A4 M1 ;...

how to import csv data into django models

i have some csv data and i want to export into django models the example of csv data 1;"02-01-101101";"Worm Gear HRF 50";"Ratio 1 : 10";"input shaft, output shaft, direction A, color dark green"; 2;"02-01-101102";"Worm Gear HRF 50";"Ratio 1 : 20";"input shaft, output shaft, direction A, color dark green"; 3;"02-01-101103";"Worm Gear HRF...

PHP CSV upload files

hi, I have asked a question regarding updating a csv file's contents to the db @Question Now I want to add this functionality, like my db will contain url to images that are stored on a prespecified folder on the server. The csv files will contain the urls as to where these images reside on the client side. Now when I click an upload ...

Consistent commas in Excel CSV

In Excel, let's say I have 5 columns, but not all of the time will a column have data. How can I force it to give a static number of commas? I end up having some rows like this (as I would like it): Field1,field2,field3,field4,field5 field1,field2,,, Then some rows like this: field1,field2,field3,field4,field5, field1,field2, fi...

Dynamically specify the type in C#

I'm creating a custom DataSet and I'm under some constrains: I want the user to specify the type of the data which they want to store. I want to reduce type-casting because I think it will be VERY expensive. I will use the data VERY frequently in my application. I don't know what type of data will be stored in the DataSet, so my init...

Exporting info from PS script to csv

Hi, This is a powershell/AD/Exchange question.... I'm running a script against a number of Users to check some of their attributes however I'm having trouble getting this to output to CSV. The script runs well and does exactly what I need it to do, the output on screen is fine, I'm just having trouble getting it to directly export to c...

Generate CSV file from rails

I've been reading similar questions, but many of the answers are outdated or not clear enough for me. I'd like to be able to just do something like (in a controller action): respond_to do |format| format.html format.csv end I know I'd then need a view such as action.csv.erb So my questions are: 1) What do I need to configure...

Convert the mysql table details to an Excel (.xls) or comma separated file (.csv) using Python

Hi, I want to convert the mysql database table contents to an Excel(.xls) or comma separated file(csv) using python script... Is it possible? Any one can help me? Thanks in advance, Nimmy ...

Forcing fputcsv to Use Enclosure For *all* Fields

When I use fputcsv to write out a line to an open file handle, PHP will add an enclosing character to any column that it believes needs it, but will leave other columns without the enclosures. For example, you might end up with a line like this 11,"Bob ",Jenkins,"200 main st. USA ",etc Short of appending a bogus space to the end of e...

Symphonia (CSV file)

Hi I'm trying to do a route in Rhapsody that transform CSV to ASTM. The problem is when i'm going to test the mapper, appears this error: unable to parse message. The character encoding may not have been recognised correctly. I don't know what to do. I hope you can help me. Thanks for all ...

Google Vizualization with CSV data

Hi, I have a URL that returns data in CSV format. I would like to use Google Vizualization to create an interactive chart of the data. I've looked at several examples on Google Chart and Vizualization web page but I'm a bit confused as I'm not familiar with JavaScript or web programming in general. Question: Do I have to use JavaScri...