csv

Unwanted Dependent Assemblies appearing in Bin\Debug folder

I have many different c# projects in a solution where one assembly is dependent on others. I have them all building in the correct order. I also have CopyLocal set to false for all references. However, when the builds of assemblies are done further down the stack, some of the assemblies are getting copied to the bin\debug folder. Why...

c# dataset to SQL Server table where datasource originates from CSV

I wanted to know what would be the easiest / best way to get a dataset contained within a datagridview into a sql database. Points to note: The data comes from a CSV file that is imported into the application. The user then has the option to modify cell data They then press a button and hopefully upload to sql table It is given that th...

Parsing Excel XML with PHP

INTRODUCTION I'm using excel downloads as a way of users downloading a score sheet, filling out scores and then re-uploading this score sheet into the system. Part of this requires the data in the database to be put into a CSV. Then its opened on the client computer. PROBLEM The problem I'm having is that the CSV does not allow me to...

How to view a DataTable while debuging

I'm just getting started using ADO.NET and DataSets and DataTables. One problem I'm having is it seems pretty hard to tell what values are in the data table when trying to debug. What are some of the easiest ways of quickly seeing what values have been saved in a DataTable? Is there someway to see the contents in Visual Studio while deb...

MySql & PHP: How to find which row has an item in the leading spot in a CSV list?

This is kind of a weird question so my title is just as weird. This is a voting app so I have a table called ballots that has a two important fields: username and ballot. The field ballot is a VARCHAR but it basically stores a list of 25 ids (numbers from 1-200) as CSVs. For example it might be: 22,12,1,3,4,5,6,7,... And another one ...

MDB 2 CSV batch.

Does anybody know what I could use to write a script to convert all MDB files in a directory to CSV files? I'm working on Windows but have been using Cygwin for some work. ...

Pass a CSV parameter in Postgres

I want to store test results in the form of a .CSV file into a central database. The DB has a schema that does not match the CSV file. Ideally, I would just pass the contents of the CSV file as a string directly to the server and have a function that can transform the CSV into a table that can be joined and used in an INSERT. Here's a...

How do I save a 2-dimensional array as a csv file?

Hi. I am using visual studio 8. vb.net. I have an array, array1(100,8) and I want to save it as a csv file so that I can open it in excel and examine the contents more closely. The feature, of saving as a csv file, is not going to form an integral part of the finished vb app, I just need something quick and dirty because the data in the...

Rails - CSV (export to csv)

i am exporting data to csv, while exporting i want to split by every 50 records, instead of exporting all together. (i.e, if i click "Export to CSV" it should export first 50 records, later again on clicking "Export to csv" it should export next 50 records and so on) please, provide me some code to solve this problem. thanks ...

Rails - CSV(export to CSV) loop

i want to do (export to CSV) in the form of fetching first 50 students and next 50 students and so on, in seperate files. i have tried with the below given code, and i dont know how to generate loop, please provide some code to do the process. @count =0 if @count == 0 students = Student.find(:all,:order => 'name', :limit => 50) @...

FasterCSV - raising MalformedCSVError when it shouldn't

Sample data: "iWine","Barcode","Location","Bin","Size","Valuation","Price","StoreName",\ "PurchaseDate","Note","Vintage","Wine","Locale","Country","Region","SubRegion",\ "Appellation","Producer","SortProducer","Type","Color","Category","Varietal",\ "MasterVarietal","Designation","Vineyard","WA","WS","IWC","BG","WE","JR",\ "RH","JG","GV"...

How do I replace "new line" characters inside double quotes in php?

Ok, I have a csv file like this: 14 ; 1234,56 ; 10203 ; "ABC" ; "DFG" ; "Lorem \n ipsum \n dolor sit" \n 15 ; 234,16 ; 10204 ; "ABC" ; "DFG" ; "Lorem \n ipsum \n dolor sit" \n 16 ; 1234,15 ; 10304 ; "CCC" ; "DFG" ; "Lorem ipsum/dolor \n sit amet\consec" \n and so on... The file has almost 550000 lines. How do I replace all \n charact...

CSV-Export problem in ruby

for Export to CSV, i have overall 2500 records, and while exporting it takes long time to export all records, so, i have decided to export in the form of 1st 50 students,and, 2nd 50 students,so on. I have tried the below code. but it could able to fetch only 1st 50 students. please, guide me how to solve the problem def exportcsv @...

How to convert tab separated, pipe separated to CSV file format in Python

I have a text file (.txt) which could be in tab separated format or pipe separated format, and I need to convert it into CSV file format. I am using python 2.6. Can any one suggest me how to identify the delimiter in a text file, read the data and then convert that into comma separated file. Thanks in advance ...

When I export files with php/html my session data resets

I have a web-based system built with user login data based on session variables. Sometimes when a user is logged in and tries to export tables to csv or xls the session data seems to wipe and the user is 'kicked out' of the system. This is the header code I'm using to serve the file. header("Pragma: public"); header("Expires: ...

Is there a tool for adding double quotes around ALL elements of a CSV?

I hava a CSV file that I want to treat as source code. Essentially I want to take the csv lines and use them as if they were calls to a function with all string parameters. The problem is, the individual elements are only double quoted when there is a comma in the text. Is there a quick way of adding the double quotes all elements i...

Very simple C# CSV reader

I'd like to create an array from a CSV file. This is about as simple as you can imagine, the CSV file will only ever have one line and these values: Device, SignalStrength, Location, Time, Age. I'd like to put these values into one dimensional array. I've tried some examples but they've all been more complicated than required. ...

CSV import (variable fields)

I have to import a series of CSV files and place the records into an Access database. This, in itself, is not too much of an issue. The complication comes from the fact that the format of each CSV file is variable in that the number of fields may vary. The best way to think about this is that there are 80 master fields, and each CSV fi...

Bulk Insert with optional text qualifier

I am importing csv to db using bulk insert. It is the comma delimited csv file. No text qualifiers for all fields. But some fields may have comma as part of the data. for eg, ADDRESS field value. Those values are surronded with double quotes. Those double quotes appear only if the field value has comma in it otherwise values are not su...

What to set as mimetype for csv files to open in spreadshell applications

My application lets user download their data as csv files. These are supposed to open in spreadsheet applications. On a linux system, I get prompted correctly to open with OpenOffice. But some of my users complain that when they download the file, it doesnot open automatically excel, but asks them to choose the application. When they dow...