csv

UTF-8 tuple storage using lowest common technological denominator, append-only

What's the most low-tech but reliable way of storing tuples of UTF-8 strings on disk? Storage should be append-only for reliability. As part of a document storage system I'm experimenting with I have to store UTF-8 tuple data on disk. Obviously, for a full-blown implementation, I want to use something like Amazon S3, Project Voldemort, ...

RDLC Export Local Report To CSV

In Visual Sudio 2010 ASPX ReportViewer Control the only export options are: Excel, PDF, and Word. How can I export the report to CSV. I understand that SSRS reports can do this, but in my situation this is not a possibility. ...

Remove all the whitespace after ',' and make first letter uppercase in CSV with PHP

I'm having a CSV like this. john,joy, anna, Lucy Bravo,boy I want to remove whitespace after ',' if it exist. And also make the first letter after ',' to be capital letter, if its not capital already. That is it should be like this: John,Joy,Anna,Lucy Bravo,Boy Only the whitespace after the ',' should go. I tried myself. But all fa...

Jar Can't Find Main Method - Connected to main class, but can't access method.

Hey everyone! I've been working on a project in Eclipse and everything's been going smooth except for some Ant issues along the way. My code compiles perfectly and does exactly what I want it to do, but, when it's in a jar, I get the error: Exception in thread "main" java.lang.NoSuchMethodError: main Main definitely exists in the f...

Literal field value for Solr CSV

Is there a way to provide a literal field value when adding a CSV document? The documents do not contain a necessary field, so I need a way to specify the value some other way. I've tried things like f.field.map=:VALUE to no avail. Setting a default value for the missing field in schema.xml works, but it's obviously not a practical so...

C# in Visual Studio: How to display a list in a DataGridView? Getting weird stuff

Hi Everybody - Been a while and I've volunteered to teach myself Windows programming at my company. Started writing vbs scripts and suddenly realized how incredibly useful this programming thing is ;-) Anyway, I'm a total newbie at C# AND Visual Studio, I kind of get how it works, you drag and drop interface pieces in the design side t...

Skip unit test if csv file not found

Hi, I have a number of unit tests which rely on the presence of a csv file. They will throw an exception if this file doesn't exist obviously. Are there any Gallio/MbUnit methods which can conditionally skip a test from running? I'm running Gallio 3.1 and using the CsvData attribute [Test] [Timeout(1800)] [CsvData(FilePath = TestDataF...

CSV file creation without exponential numbers

Hello Everyone, How do you get around the exponential conversion that takes place when inserting a value into a csv file. I have a process that creates a csv file and then starts entering rows into it. One of those fields inside a row inserts a value similar to this: 123,45,45,466,6656,23423,2455,234,2454 These are just a string of i...

How to read a delimited line of strings and ints and extract them for processing in VB

Hi, I have the following text file (ExamMarks.txt) John, 85, 95, 90 Micheal, 60, 75, 75 I want to extract a line and take the Name and separately and the ints separately. Then I want to print the name and the average of the numbers like this in a label: John's average is 90 Micheal's average is 70 So far I can only display what is ...

How do I allow a user to upload a file temporarily?

I am working on a csv import option on my php page. Is there any way to allow the user to upload a csv for processing and then destroy the file when it is complete? I have seen plenty of tutorials for uploading files, but none seem to mention something like this. ...

converting csv string to a string with spaces instead of commas in php

I'm having a string which is comma seperated like this $str = "john, alice, mary,joy"; Some are having space after comma and some don't. What I want to do is remove all the commas and make them like this: $str = "john alic mary joy"; What is the best way to do this in php? ...

CSV into array in C.

Hi there, I'm trying to load a CSV file into a single dimentional array. I can output the contents of the CSV file, but in trying to copy it into an array I'm having a bit of trouble. Here is my existing code, which I realise is probably pretty bad but I'm teaching myself: #include <stdio.h> #include <string.h> #define MAX_LINE_LENGT...

How to get download csv file using java servlet ?

Hi, I have sample java servlet file.but it is export to local file.But i need to download the csv file when the hit download button ? here is servlet class , what code i need to add here for download the csv file ? import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; public class CsvFile extends Ht...

Google App Engine: Encoding type for CSV?

I am trying to upload data using appcfg.py upload_data. My CSV was encoded as ANSI, but Alex Martelli said that it should probably be UTF-8. So I switched to that (using Notepad++). This hit an error at the very first character of my file: UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)...

Export Data to CSV file

We have more than 65,536 rows of data to export(write) in .csv file. But Excel(CSV) supports only 65,536. Excel supports multiple workbook, so we can write the data in multiple workbooks . But CSV doesn't support this feature too. Is there any other way to do this. Could any one help on this? ...

Regular expression to find and replace unescaped Non-successive double quotes in CSV file.

This is an extension to a related question answered Here I have a weekly csv file which needs to be parsed. it looks like this. "asdf","asdf","asdf","asdf" But sometimes there are text fields which contain an extra unescaped double quote string like this "asdf","as "something" df","asdf","asdf" From the other posts on here, I was a...

In PHP, Removing first element in CSV String

I'm simply looking to take the first csv out of a string, using PHP. Here are a few examples: "Sea Bass, Floured Or Breaded, Fried" => "Floured Or Breaded, Fried" "Tuna, Fresh, Baked Or Broiled" => "Fresh, Baked Or Broiled" "Croaker, Breaded Or Battered, Baked" => "Breaded Or Battered, Baked" And so on... Thank you. ...

Is there such thing as a spreadsheet object/library

I'm trying to generate some reporting from existing reports in CSV format. These CSV files don't contain just data, but report name, report date, multiple data sets- each line doesn't necessarily contain the same number of fields or consistent data per row. I was curious if there was some spreadsheet type library available, this is how...

CSV Export Script only generates error in IE?

I have a CSV export script (enrdata_arch.php) which calls information from an existing database and exports it into CSV format. For some reason however, the script returns the following error ONLY in Internet Explorer: Microsoft Office Excel cannot access the file 'https://www.domain.com/admin/enrdata_arch.php'. There are several possib...

Convert .csv to .xls in Java.

Hey everyone, Does anyone here know of any quick, clean way to convert csv files to xls or xlsx files in java? I have something to manage csv files already in place and I need the extra compatibility for other programs. Sample code in addition to package names is always well appreciated. Many thanks, Justian Here's my code thus fa...