aspose file tools*
The moose likes Java in General and the fly likes Excel & Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Excel & Java" Watch "Excel & Java" New topic
Author

Excel & Java

Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Are there any java code that reads a excel ..
I mean a java code that treats excel as a back end ..

Srini


Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Thanks i wrote .. it's a normal Jdbc code for Excel driver
Arnold Reuser
Ranch Hand

Joined: Nov 20, 2003
Posts: 194
Are you already familiar with the POI project?
http://jakarta.apache.org/poi/

An excerpt from their site :

The POI project consists of APIs for manipulating various file formats based upon Microsoft's OLE 2 Compound Document format using pure Java. In short, you can read and write MS Excel files using Java. Soon, you'll be able to read and write Word files using Java. POI is your Java Excel solution as well as your Java Word solution. However, we have a complete API for porting other OLE 2 Compound Document formats and welcome others to participate.
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Oh !! it's very nice ...
i'll have a look at it

Thanks yaar...
Srini
Terry Mullett
Greenhorn

Joined: Feb 21, 2003
Posts: 26
I've used POI on the job and it works great. It does (or at least did when I last used it) model the Excel format fairly directly, which requires that the developer needs to have some cognizance of how Excel stores data. Excel has a pretty crappy format. But once you understand it, POI's not hard to use.

Another option that works well if you're using spreadsheets as input is to have your spreadsheets saved as XML and then use XPath (or DOM or what-not) to navigate to the pieces you want to work with. That's pretty slick if you can hand out an input template with named sheets, named ranges and sheet/workbook protection, because there will be XML elements that help you identify cells semantically. As far as I know, saving as XML can only be done with Excel XP/2003.

Regards,
Terry
SCEA,SCWCD,SCBCD,SCJP
Arnold Reuser
Ranch Hand

Joined: Nov 20, 2003
Posts: 194
I didn't know that the combination of XML and XPath was possible for spreadsheets. Is this solution straightforward or do you have to have a lot of experience with MS XML, maybe there are some strange side effects, to generate spreadsheets like that?
Can you also import the xml structure as an excel spreadsheet?
[ October 03, 2004: Message edited by: Arnold Reuser ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Excel & Java
 
Similar Threads
Java MySQL MS Excel
Interfacing JAVA and Microsoft Excel
dynamically create attendance sheet in jsp
writing to excel sheet
Save a webpage as PDF or Excel file