I'm working to convert the content of an excel (.xlsx) file to html, to the best extent possible...
I tried both Apache Tika and directly Apache POI, but I haven't been able to extract charts or images included in an excel file. I also looked in the XSSFExcelExtractorDecorator class from the Apache Tika sources, but I don't understand how I should use that Decorator class, and I can't find an end-to-end example about this.
Can anybody provide a working example, or a hint for the starting point ?
Thank you.
I'm using IText libray for do a PDF. This works, but I need generate the same document, but this time in Excel (xls). There's a way to convert a PDF using GWT or IText? If not, how can I do this? I searched and I found a library called JExcel. What is better?
Thanks for attention and help!
I am trying to read data from database and then need to write the data to an excel/csv file in an java application. The data from database can be more than 10000 rows. So could someone suggest a nice solution taking into account the performance issue also.
Is there a way we can directly read and write to excel sheet.
Thanks in advance,
Kathy.
You can use Apache POI to do this: http://poi.apache.org
Use the HSSFWorkbook as an abstraction of a .xls workbook. There's also a XSSF format for the newer XML-based Excel files (.xlsx, etc).
Apache POI will best suits to your problem.
Try the following references example and document.
http://poi.apache.org/
http://viralpatel.net/blogs/java-read-write-excel-file-apache-poi/
The second reference will give you the whole implementation of how to work with POI.
When it comes to java excel you should try out Apache POI.
Apache has a nice library that should meet your requirements.
Look into http://poi.apache.org/
Hope this helps.
I need to convert an excel spreadsheet to PDF file. I looked for in the Web and I found that the best way to do this is using OpenOffice API, but it is not free.
Someone know any open source library for doing this?
Any examples code is appreciating
Apache POI can read Excel. iText can write PDF.
I am very new to java. I am trying to fetch some data from a database and the result set is displayed in excel. I am able to inetract with database. But how should I go ahead for inserting data into excel sheet.Its simple Java program and in future I would like to generate files in other format say PDF, doc etc.
I am looking for an approach with lesser load on CPU, faster.
thanks in advance for help.
Just spit out a CSV file. It's lightweight and portable. You can grab a csv writer from Apache commons I think but spending the 10 min it would take to write one might be a good learning exercise as well.
If you want a real solution where you want different outputs (eg excel, pdf, rich text etc) then use a reporting tool. There are plenty of opensource tools like ireport which will let you create a template then write a simple java app that renders that to pdf, excel etc. Otherwise you will end up doing it by hand. It's a bit heavyweight but anything more than trival tabular output will be easier.
Apache POI is for you in this case, but you will find it a little bit overwhelmed if you just need to write/read data from an excel file.
Try jExcel instead, the API is simple and straightforward, you can also manipulate sheets within an excel workbook.
The easiest and standard way of doing this is to use POI library:
http://poi.apache.org/spreadsheet/quick-guide.html
The new xlsx format is based on Open-XML and would provide a method of generating these files without any dependency on Microsoft-office COM libraries -- the same could done for docx and pptx formats later, as well as other open-Xml formats like EPUB.
The Apache POI project looks like it might provide one possible solution. There's also an article on the MSDN interop blog that discusses this in some detail.
The key words you should google for are OLE and DDE.
Though, Java is not the best language for interface Microsoft's software.
for generating excel i think you should try simreport in jsimreport.com. in my opinion, it's quite simple to make an excel report, it uses the excel sheet to generate report so easy to config and visually