Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Blank results of get(String arg0)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Fenomen  
View profile  
 More options Nov 30 2011, 6:06 am
From: Fenomen <marek.feno...@gmail.com>
Date: Wed, 30 Nov 2011 03:06:55 -0800 (PST)
Local: Wed, Nov 30 2011 6:06 am
Subject: Blank results of get(String arg0)
Hi,

I've got some strange problem with the CSV Reader. When I try to read
data from file, the method get(String arg0) return blank ("") String
instead of expected value.

I do it in following way:

try {
reader = new CsvReader(path);
reader.getHeaders();
while (reader.readRecord()) {
...myField = reader.get("NameOfSomeColumnInMyCSVFile")

}

catch (Exception e) {
e.printStackTrace();

}

And myField is blank - other words, when I would like to get the value
of myField, I get empty string ("")

What is more confusing, I used that library for other csv files and
everything went ok; So i wondered, whether there is some diffirence
between working- and non-working file, but I haven't found any.

Could you suggest me any ideas, what could be wrong?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shriop  
View profile  
 More options Nov 30 2011, 7:13 am
From: shriop <shr...@hotmail.com>
Date: Wed, 30 Nov 2011 04:13:55 -0800 (PST)
Local: Wed, Nov 30 2011 7:13 am
Subject: Re: Blank results of get(String arg0)
You're calling getHeaders() at the beginning when you want to be
calling readHeaders(). getHeaders is a property accessor method that
returns the headers as an array of strings. readHeaders is the method
that will read a line of data as a header line ad initialize the
header array.

Bruce Dunwiddie

On Nov 30, 5:06 am, Fenomen <marek.feno...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fenomen  
View profile  
 More options Dec 1 2011, 8:31 am
From: Fenomen <marek.feno...@gmail.com>
Date: Thu, 1 Dec 2011 05:31:02 -0800 (PST)
Local: Thurs, Dec 1 2011 8:31 am
Subject: Re: Blank results of get(String arg0)
Yeah, I found the solution on my own.
Just the same, thanks for message.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »