This discussion is archived
5 Replies Latest reply: Feb 27, 2013 11:32 PM by EJP RSS

Java API for Excel Operation

Madhav.T.Reddy Newbie
Currently Being Moderated
Hi ,

I have requirement to read&write data from Excel ,
I know many of third party libraries provide this fecility but my project restricted to use only JAVA API.
In My project ,we are not suppose to use any third party libraries.
is any JAVA API for Excel operations?

Thanks,
Madhava.
  • 1. Re: Java API for Excel Operation
    gimbal2 Guru
    Currently Being Moderated
    Madhav.T.Reddy wrote:
    Hi ,

    I have requirement to read&write data from Excel ,
    I know many of third party libraries provide this fecility but my project restricted to use only JAVA API.
    In My project ,we are not suppose to use any third party libraries.
    is any JAVA API for Excel operations?
    Nope. Use third party stuff, or don't do it.

    You can however play a trick if the requirements really are that simplistic. In stead of using actual excel files, export data to a CSV file in stead and use that. Then all you need basically is regular Reader/Writer classes to manipulate the file. The end result is still the same: you can read & write data "from excel".
  • 2. Re: Java API for Excel Operation
    Madhav.T.Reddy Newbie
    Currently Being Moderated
    Hi Thanks for reply ,i am tried in that way also, copiedthe data from Excel to CSV file(text file).but my data is Table format look like below.

    Emp ID     EMP Name     Skills
    101     AAA     Java
    102     BBB     Sprin,Struts
    103     CCC     Oracle ADF

    i need to get data against Emp ID, how can get in text file.THis we can be done in Excel easily.
    Is any code/process to get the EMP name and skills for beased in EMP ID from CSV file.


    THanks,
    Madhava
  • 3. Re: Java API for Excel Operation
    EJP Guru
    Currently Being Moderated
    That's not a CSV file. CSV stands for Comma Separated Values. It's not a difficult format to produce, or to read, but you need to get it right. There is no magical 'process' other than just writing the code, but make sure you understand the file format correctly first.
  • 4. Re: Java API for Excel Operation
    Madhav.T.Reddy Newbie
    Currently Being Moderated
    But thing is the text file treat as entire data is one data,it's not like row wise and column wise.
    we can read the data by stream as whole from file ,but how can get/know EMP data based on EMP id.

    Regarding Secuirty constrains of my project i am not send the Actually Requirement or data.
    Basic requirement is Based Trans ID i need to get Email ID then send the email to Businees people.
    Right now Excel has data for all Trans ID.
    how can acchive this issues the Same Excel data converted in to Text file data.

    Thanks,
    Madhava
  • 5. Re: Java API for Excel Operation
    EJP Guru
    Currently Being Moderated
    But thing is the text file treat as entire data is one data,it's not like row wise and column wise.
    I don't know what that means. An Excel file isn't 'one data', it is in fact one or more spreadsheets, each of which contains rows and columns.
    we can read the data by stream as whole from file ,but how can get/know EMP data based on EMP id.
    It's just a column in a row, just like everything else in the file.
    Regarding Secuirty constrains of my project i am not send the Actually Requirement or data.
    Nobody has asked for it. I don't see the point of this remark.
    Basic requirement is Based Trans ID i need to get Email ID then send the email to Businees people.
    Right now Excel has data for all Trans ID.
    These statements have no relevance to this forum.
    how can acchive this issues the Same Excel data converted in to Text file data.
    This question has no ascertainable meaning whatsoever. You've been told you must use CSV. I have no idea what you're asking for now.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points