Forum Stats

  • 3,872,219 Users
  • 2,266,407 Discussions
  • 7,911,107 Comments

Discussions

Java API for Excel Operation

Madhav.T.Reddy
Madhav.T.Reddy Member Posts: 32
edited Feb 28, 2013 2:32AM in Java Desktop Applications
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.

Answers

  • gimbal2
    gimbal2 Member Posts: 11,949 Gold Trophy
    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".
  • 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
  • EJP
    EJP Member Posts: 32,921 Gold Crown
    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.
  • 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
  • EJP
    EJP Member Posts: 32,921 Gold Crown
    edited Feb 28, 2013 2:32AM
    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.
This discussion has been closed.