Results 1 to 4 of 4
  1. #1
    anthrax is offline Member
    Join Date
    Feb 2009
    Posts
    57
    Rep Power
    0

    Default what's the token for excel file?

    i want to write a program that will extract data from excel cells but i dont know what token to look for.. i have tried getting data from text file which are separated by ", "

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    excel files are a horrible binary file format. internally they are kind of like a FAT file system with pieces like a .WAV file, like silly header structures and a length of data, and fragmented up in nonsensical manner.

    There are two API I know of, jexcelapi and POI that work to create a Java excel file reader. it takes some getting used to get into each of their conventions, usually something like opening the file, reading the worksheet, then reading a cell within the worksheet. they have some good documentation on their respective sites that should help you get started.

    to make matters more difficult, excel files aren't data in one row and then many rows of data like a .csv file is. there could be data at a given cell in the middle of the sheet on its own, and the rest of teh cells can be all null / blank. you kind of have to know a bit of what to expect to read from the excel file ahead of time to be able to parse it programatically.

    I would recommend if possible, for starting off, to manually open the excel file in openoffice, excel, etc, and save-as it to a .csv file, and then create a program to parse the .csv file, once you are able to get the thing you want working, then play with getting something to read from teh excel file for you.

  3. #3
    anthrax is offline Member
    Join Date
    Feb 2009
    Posts
    57
    Rep Power
    0

    Default

    :eek: :eek: thanks for the tips and explaination ;)

  4. #4
    slavamk is offline Member
    Join Date
    Jan 2010
    Posts
    3
    Rep Power
    0

Similar Threads

  1. How to read Excel file with java
    By chetan-24 in forum New To Java
    Replies: 6
    Last Post: 09-13-2014, 12:43 PM
  2. Converting excel file to text file
    By saranya_v11 in forum New To Java
    Replies: 3
    Last Post: 07-05-2013, 10:22 AM
  3. How do you create an excel file?
    By Arnold in forum New To Java
    Replies: 4
    Last Post: 10-11-2009, 04:17 PM
  4. How to Read Excel file??
    By spalax in forum New To Java
    Replies: 3
    Last Post: 08-15-2009, 05:06 AM
  5. Not able to generate excel file locally
    By wickedrahul9 in forum Advanced Java
    Replies: 4
    Last Post: 10-23-2008, 11:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •