I am looking for java alternative for python library. Here is the question
how to read an excel file on google app engine
Take a look at the blog posting 'How to generate excel files on GAE?'. It discusses using the JExcelAPI library in GAE. JExcelAPI supports both writing and read of Excel documents, and doesn't seem to have a dependency on the JRE classes that cause issues with the use of Apache POI.
Related
All of the methods that i've searched for seem to use itext libraries, but is there a way to just use apache poi libraries ?
I don't believe so. POI is strictly for Microsoft documents and PDF was created by Adobe. So the short and quick answer is no.
If you read the docs for Apache's POI project you'll read in the title "Apache POI - the Java API for Microsoft Documents".
Apache POI Project
POI is explicitly made for Microsoft Documents. Using itext is the easiest way to generate or create a PDF file within Java.
Is there any java api which is similar to open xml sdk 2.0. Just I need to convert open office xml excel file to .xlsx file.
office xml excel file I'm creating by using xml and xslt. I tried apache poi to read xml excel file but getting invalid header format exception.
Thanks.
Well, I believe the best API out there to handle *.xlsx files is Apache POI (it has *.xlsx support since 3.7 or so).
Some alternatives:
There was a project called JExcel API, but there's not much activity there in the last 3 or so years (and I'm not sure if it handles *.xlsx format, only *.xls, but I might be wrong).
I'm not sure, but the OpenOffice UDK might also help you. Unfortunately it is only a binding, and requires an installed implementation (i.e., you have to install OpenOffice in order to use it), which is not always a valid requirement on the server side if you do not have any X servers there.
Another option is something like using it through Jacob via COM. The pro is that you are able to access all ow the data, the con is COM, you need an installed Excel on your machine (and of course, it is a Windows-specific solution).
I believe the best way to stick to Apache POI, it is usually perfectly enough if you just want to read/write cell data.
I have an application which currently uses the Apache POI libraries to produce Microsoft Powerpoint documents. I need to move this application into a more restricted environment which doesn't allow the POI libraries.
Are there any alternatives to POI and interfacing with COM for writing information to PowerPoint with Java?
I could learn and work with COM, but I'd rather avoid it at this point.
Thanks
I would suggest that you look at two commercial libraries.
The first is Aspose. It's a library that works a bit like Apache POI but in a "easiest" way. At my company, we are using it to include charts in Excel file (a thing that is not yet supported by POI).
Ezjcom is probably the library you want. It needs a living Office instance and allow you to interact with excel as if you were making a macro in Basic, but from Java. Watch-out, the documentation is terrible!
A question that seems to have quite a few options for Python, but none for Java after googling for two days. Really really could use some help all I have found so far is a recommendation to use gaeVFS to build an excel file from the xml components and then zip it all together which sounds like a slap in the face. Oh yes and if you were wondering I am questioning my use of Java rather than python but at 5,000 lines of code it would be insane to turn back now...
Other things you might find useful
Client: GWT
Server: Servlets running
on google app engine storing data
into the google data store
Excel file: mandatory, CSV isn't good
enough, no need to save the file just
to be able to "serve" it to the
client i.e. open a "Save As" box.
Have you checked out this api already: Java Excel API ?
You could also take a look at the Apache POI project. You can read and write MS Excel documents with this library.
Take a look at this post.
It's a step by step tutorial on how to generate excel files on google app engine.
Try this :
http://code.google.com/p/gwt-table-to-excel/
google app engine do not support input/output stream classes, you need to use google app engine virtual file system.
I've seen various means of reading (and writing) Excel spreadsheets. For example:
In .Net as an ADO.Net source (as per Reading Excel files from C#);
In Java with either JExcelAPI ("jxl") or Apache POI;
In PHP with the Excel Spreadsheet Writer (as per Format text in Excel file via PHP and PHP:Writing to excel file using PEAR).
But I'm interested in more than just reading/writing Excel files. I want something where I can evaluate arbitrary Excel formulas. So far in this vein I've seen:
C# Excel Interop, although this seems to require that you have Excel running; and
POI-HSSF: this formula support seems incomplete.
Are there better options or is that it?
SpreadsheetGear for .NET is compatible enough with Excel that Microsoft uses it to calculate Excel based calculators on their MSN Money web site.
If you're only targeting the windows platform, you really have no substitute for running Excel, and controlling it via a COM bridge.
As you are finding, any other solution is likely to be
incomplete, and/or
incompatible and/or
inconsistent
with Excel.
Unfortunately, this does add a dependency on Excel to your software.
If you want to evaluate Excel formulae, frankly Excel is the only reliable way to do this. So running Excel via a COM bridge is the way to go.
I've done this before in Java using JACOB and that works very nicely. Excel looks after all the functionality. You just have to populate your spreadsheet (in memory) and let Excel do the rest.