Printing name tags from a csv file
Hi All,
I'm from South Africa and am new to the Java scene.
I would like information to compile a simple program to print name cards from a csv file.
I have pre-printed paper for use on a dot-matrix that has a space for certain fields to go on it. The paper has 4 rows and 5 columns of tags (i.e 20 name tags)
My csv file is formatted in the following manner : name,surname,company name,delegate number - but without headings.
Any help on the matter would be great.
Thanks
Ian
Re: Printing name tags from a csv file
Re: Printing name tags from a csv file
Hello infoman.
Welcome to the Java Programming Forums.
DanBrown, thanks for your help with this but please be careful with the 'spoonfeeding'
Providing full solutions for newbies is something we are trying to stamp out here now.
We believe that providing full solutions straight away actually hinder the learning process. I think the best approach is to provide a helping hand in how to move forward and then let the OP reply with any questions they have.
Just a thought for the future!
Re: Printing name tags from a csv file
you are right.I will take care of this in future.
Re: Printing name tags from a csv file
Thank you for your understanding Dan.
Re: Printing name tags from a csv file
Quote:
Originally Posted by
DanBrown
[highlight=Java]
Code :
String strLine = "";
StringTokenizer st = null;
int lineNumber = 0, tokenNumber = 0;
why StringTokenizer? A simple split will do. Also , StringTokenizer is outdated. The Scanner has useDelimiter() for these things.
Re: Printing name tags from a csv file
Quote:
Originally Posted by
JavaPF
We believe that providing full solutions straight away actually hinder the learning process.
you should remove the post then. If you leave it , you are telling people you don't mind , even though you advocate it.
Re: Printing name tags from a csv file
yes we can also use split function.
Re: Printing name tags from a csv file
Quote:
Originally Posted by
JavaHater
you should remove the post then. If you leave it , you are telling people you don't mind , even though you advocate it.
This has been done. We will be posting new forum guidelines soon and enforcing the rules as requried. Thanks.