Все вопросы: [csv]

435 вопросов

5
голосов
3ответов
16561 просмотров

How to read a csv file with python

I'm trying to read a csv file but it doesn't work. I can read my csv file but when I see what I read, there where white space between values. Here is my code # -*- coding: iso-8859-1 -*- import sql_db, tmpl_macros, os import security, form, common import csv class windows_dialect(csv.Dialect...

4
голосов
5ответов
3776 просмотров

AppEngine GeoPt Data Upload

I'm writing a GAE app in Java and only using Python for the data upload. I'm trying to import a CSV file that looks like this: POSTAL_CODE_ID,PostalCode,City,Province,ProvinceCode,CityType,Latitude,Longitude 1,A0E2Z0,Monkstown,Newfoundland,NL,D,47.150300000000001,-55.299500000000002 I was able...

0
голосов
2ответов
1639 просмотров

Synchronizing between SQL Server and CSV file

What is the better way to synchronize a table (customers), inside SQL Server and the customers inside an CSV file in Microsoft Excel? Ok, here is the explanation: I am developing a software in C#.NET 2008, and I create a table named Customers in SQL Server 2005. The contents of this table comes ...

9
голосов
6ответов
44592 просмотров

C# Excel import data from CSV into Excel

How do I import data in Excel from a CSV file using C#? Actually, what I want to achieve is similar to what we do in Excel, you go to the Data tab and then select From Text option and then use the Text to columns option and select CSV and it does the magic, and all that stuff. I want to automate ...

2
голосов
1ответов
6092 просмотров

Bulk insert into SQL Server a CSV with line breaks in fields

I have a csv that looks like this: "blah","blah, blah, blah ect, ect","column 3" "foo","foo, bar, baz more stuff on another line", "another column 3" Is it possible to import this directly into SQL server?

0
голосов
3ответов
2037 просмотров

Outlook Contact Export to CSV format differences

Outlook 2003 and Outlook 2007 allow you to export your contacts to CSV format. Is there a difference between the two or is this in fact the same format; in other words, are they backward compatible or did Outlook 2007 create some new fields that Outlook 2003 would have trouble importing?

3
голосов
3ответов
6396 просмотров

How to Open a CSV or XLS with Jet OLEDB and attain Table Lock?

I am trying to figure out how to read/write lock a CSV or XLS file when I read it as a Database via Jet OLEDB. The following code will open a CSV as a DB and load it into a DataTable object: private DataTable OpenCSVasDB(string fullFileName) { string file = Path.GetFi...

1
голосов
2ответов
1026 просмотров

Best way to transpose a grid of data in a file

I have large data files of values on a 2D grid. They are organized such that subsequent rows of data in the grid are subsequent lines in the file. Each column is separated by a tab character. Essentially, this is a CSV file, but with tabs instead of columns. I need the transpose the data (first ...

0
голосов
3ответов
2352 просмотров

python csv help

Sometimes I need to parse string that is CSV, but I am having trouble whit quoted comas. As this code demonstrated. I am using python 2.4 import csv for row in csv.reader(['one",f",two,three']): print row i get 4 elements ['one"', 'f"', 'two', 'three'] but I would like to get this ['one",...

19
голосов
9ответов
46358 просмотров

Building a comma separated list?

I'm tryin to use SQL to build a comma separated list of cat_id's the code is: declare @output varchar(max) set @output = null; select @output = COALESCE(@output + ', ', '') + convert(varchar(max),cat_id) edit: changed '' to null, STILL same. but the output im getting is like so: ...

20
голосов
1ответов
6522 просмотров

Merge many data frames from csv files, when ID column is implied?

I'd like to merge a bunch of data frames together (because it seems many operations are easier if you're only dealing w/ one, but correct me if I'm wrong). Currently I have one data frame like this: ID, var1, var2 A, 2, 2 B, 4, 5 . . Z, 3, 2 Each ID is on a single row w/ several s...

0
голосов
3ответов
640 просмотров

Retrieving and displaying UTF-8 from a .CSV in Python

Basically I have been having real fun with this today. I have this data file called test.csv which is encoded as UTF-8: "Nguyễn", 0.500 "Trần", 0.250 "Lê", 0.250 Now I am attempting to read it with this code and it displays all funny like this: Trần Now I have gone through all the Python doc...

38
голосов
10ответов
121876 просмотров

Bash shell scripting - csv parsing

I am trying to parse a CSV containing potentially 100k+ lines. Here is the criteria I have: The index of the identifier The identifier value I would like to retrieve all lines in the CSV that have the given value in the given index (delimited by commas). Any ideas, taking in special conside...

2
голосов
1ответов
5674 просмотров

Export file as CSV in Crystal Report 11

Hi I am trying to export a report as CSV format from Crystal Reports 11, but the problem is that each string value is wrapped inside quotes, which I don't want. I tried to set the delimiter as space but it didn't works. Can someone please help me with this..? Here is my code: elseif ExportForma...

5
голосов
2ответов
3659 просмотров

Best method for importing csv or excel file to SQL Server 2005 using .net MVC view

I'm looking for the best method for importing csv or excel file to SQL Server 2005 using .net MVC. Thank you.

0
голосов
2ответов
1285 просмотров

Import CSV from url address and export as XML -- Rails

Two questions: How can I import a file from a web address, without a form? Example: Organisation.import(:from => 'http://wufoo.com/report.csv') How can I use xml builder without pulling from the db? More Info My company uses wufoo for web forms. The data from wufoo is exported as csv f...

11
голосов
6ответов
6817 просмотров

Ruby: cannot parse Excel file exported as CSV in OS X

I'm using Ruby's CSV library to parse some CSV. I have a seemingly well-formed CSV file that I created by exporting an Excel file as CSV. However CSV.open(filename, 'r') causes a CSV::IllegalFormatError. There are no rogue commas or quotation marks in the file, nor anything else that I can see...

0
голосов
1ответов
2598 просмотров

How to apply Loop to working Python Selenium Script?

I'm trying to figure out how to apply a for-loop to this script and I'm having a lot of trouble. I want to iterate through a list of subdomains which are stored in csv format (ie: one column with 20 subdomains) and print the html for each. They all have the same SourceDomain. Thanks! #Python ...

1
голосов
1ответов
1756 просмотров

Reading a CSV file in chunks

For a new import feature for my users, I'm using fgetcsv to read CSV files generated by social book cataloging sites like LibraryThing and Shelfari and then I run a series of Amazon queries to look up ISBNs from within the files. I want to be able to have users confirm the titles that match certa...

13
голосов
7ответов
28975 просмотров

Reading CSV files in C#

Does anyone know of an open-source library that allows you to parse and read .csv files in C#?

0
голосов
3ответов
4668 просмотров

How can I convert HSSFWorkbook into a CSV file..?

I wish to convert HSSFWorkbook into a CSV file format and then write it to ServletOutputStream where I have setContentType as text/x-csv. Thanks in advance.

0
голосов
2ответов
2868 просмотров

Export Crystal Report to CSV Format

How to export the crystal report to .csv file format?

5
голосов
8ответов
4901 просмотров

csv parser in erlang

for my application i have to parse CSV file using Erlang.following is the code which will parse CSV using Erlang:- parse_file(Fn) -> {ok, Data} = file:read_file(Fn), parse(binary_to_list(Data)). parse(Data) -> lists:reverse(parse(Data, [])). parse([], Acc) -> Acc; parse(Data, Acc) -&g...

0
голосов
3ответов
1650 просмотров

Converting List in Comma Separated List with linq?

I am having a info class with following field like id,name,address and i have created list of that info like List. I want to have all the values of list into comma seperated strings using linq. Is there any way for this.

2
голосов
1ответов
1211 просмотров

web2py - python

I'm developing an application using web2py, and I want to generate a csv file so that the columns becomes rows. e.g: The file is generated as: name mobile email Address yyy yyyyy yyy yyyyy I want the file to be generated as the following design: name yyy mobile...

0
голосов
2ответов
15592 просмотров

Extracting data from a CSV file in Python

I just got my data and it is given to me as a csv file. It looks like this in data studio(where the file was taken). Counts frequency 300 1 302 5 303 7 Excel can't handle the computations so that's why I'm trying to load it in python(it has scipy :D). I want to load the data in ...

118
голосов
11ответов
118024 просмотров

How to read data when some numbers contain commas as thousand separator?

I have a csv file where some of the numerical values are expressed as strings with commas as thousand separator, e.g. "1,513" instead of 1513. What is the simplest way to read the data into R? I can use read.csv(..., colClasses="character"), but then I have to strip out the commas from the relev...

937
голосов
18ответов
692567 просмотров

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.

0
голосов
2ответов
311 просмотров

Join characters using SET BASED APPROACH (Sql Server 2005)

I have a table where the data are like Data a b c I need to write a SQL Query to bring the following output Data abc Note:~ The number of characters are not constrained to 3. I have solved using while loop. But I have to do it using set based approach.So how can I join those characte...

3
голосов
6ответов
2427 просмотров

Comma Separated Value Files (Read/Write) - C#

I've been very interested in CSV files for a few years now, but I never needed to use them until now, so I'm pretty new to this. I have an application that stores information about Controls that were created by the user at run-time. I plan on using CSV files to store this information which will ...