Skip to Content
author's profile photo Former Member
Former Member

Java CSV

Hi, I'm writing a program in java that has to upload a csv file from the disk, but i can´t find examples to guide me, (I´m new in Java HTMLB programing).

Can anybody help me ...

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 14, 2004 at 09:50 AM

    Hi Virginia,

    could you please be a little bit more specific? Do you have to "parse" the contents of the file or is it just a data transfer?

    Regards

    Stefan

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello Virginia,

      You could download the util.jar file (from http://ostermiller.org/utils/download.html).Set your CLASSPATH environment variable to include this utils.jar.

      (read the installation on the same page). You can try out examples.

      import com.Ostermiller.util.ExcelCSVParser;

      ....

      File f = new File (example.csv);

      FileInputStream file_stream = new FileInputStream(f);

      ....

      String[][] values = ExcelCSVParser.parse( file_stream ); // values contains the parsed values which can be displayed in html table.

      ..

      Hope this is of some help.

      Regards

      Shilpa

  • author's profile photo Former Member
    Former Member
    Posted on Jul 28, 2004 at 10:41 AM

    Well i managed to upload the cvs file with the file upload, and them separated the ";" with Tokenizer.

    Now i have a problem with dates.

    one of the fields is a date type and i want to separe the them in working days and weekend days.

    I tried to use the SimpleDateFormat and Calendar,but nothing.

    Anyone what´s to help me?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.