Questions tagged [jexcelapi]

Java Excel API(jexcelapi) - A Java API to read, write, and modify Excel spreadsheets

Java Excel API is a mature, open source (GNU Lesser General Public License) Java API enabling developers to read, write, and modifiy Excel spreadsheets dynamically. Java developers can read Excel spreadsheets, modify them with a convenient and simple API, and write the changes to any output stream (e.g. disk, HTTP, database, or any socket).

Similar Java libraries include Apache POI

Major features include:

  • Reads data from Excel 95, 97, 2000, XP, and 2003 workbooks
  • Reads and writes formulas (Excel 97 and later only)
  • Generates spreadsheets in Excel 2000 format
  • Supports font, number and date formatting
  • Supports shading, bordering, and coloring of cells
  • Modifies existing worksheets
  • Is internationalized, enabling processing in almost any locale, country, language, or character encoding (formulas are currently only supported in English, French, Spanish, and German, but more can be added if translated)
  • Supports copying of charts
  • Supports insertion and copying of images into spreadsheets
  • Supports logging with Jakarta Commons Logging, log4j, JDK 1.4 Logger, etc

Known Limitations:

  • JExcelApi does not generate or chart, graph or macro information. This information is however preserved when spreadsheets are copied
  • When adding images to a sheet, only PNG image formats are supported

Useful Links:

207 questions
2
votes
3 answers

Appending data in an Excel file

I am trying to write a program that will append data to an Excel file in Java. I got up to the following code. But it rewrites the contents in the Excel file, not appending to it. Please help me to complete this. public class jExcel { static…
V I J E S H
  • 7,464
  • 10
  • 29
  • 37
2
votes
1 answer

JExcelAPI reads date fields incorrectly

I've been using JExcelAPI to write and read Excel files in Java. It works fine when I read files written by JExcelAPI, but if I modify a .xls file with another program like OpenOffice, JExcelAPI is no longer able to read it properly. For example, a…
Atte Juvonen
  • 4,922
  • 7
  • 46
  • 89
2
votes
1 answer

JExcel - Modify Multiple Cells Before Closing WritableWorkbook

I am trying to put a title in cell (0,0) and then use a for() loop to add file paths into each following row. However, I am only able to add one line of code; after the title, no other cells in the Excel document are modified. Here's where I create…
2
votes
0 answers

How to get the cell value as how it was presented in excel

I am new for Apache Poi. I have to read the excel with multi columns. i did something but i got unexpected result. please find the sample input and code with output. I have to read particular column and get that column values was presented in…
Kannan Arumugam
  • 1,119
  • 2
  • 18
  • 27
2
votes
1 answer

Printing entire Excel Workbook in java without opening the excel document

How do I print an excel Workbook without having it open in the background, using Java? Please note that I need to print all the sheets, not just the active one. I have tried things like Desktop.print(FileName); but that doesn't seem to work for…
TheLuminor
  • 1,411
  • 3
  • 19
  • 34
2
votes
1 answer

Every time I write to excel, it overwrites the entire file with a blank file - PUZZLED

What I am trying to do is onTestFailure (TestNG) I am trying to write a pass/fail to a specified column. In the below code, I just wanted to do a little test to write Fail to a specified cell. But what's happening is, instead of writing a pass/fail…
user2474976
  • 87
  • 3
  • 13
2
votes
0 answers

How to create month/year filters in Excel, while using jExcel?

In Excel, if we had a date column, and we add the filter at the top of the column, we would see filters by year, month etc. For example, if we had a column with two values like this "03/11/2014" and "02/11/2014", we would see a filter for 2014 and…
user187809
  • 706
  • 2
  • 8
  • 23
2
votes
2 answers

Read excel cells and determine formatted words in cell

Is it possible to read the format of a cell from an excell sheet and determinde which words are bold or italic? I can read and write to cells, and I also know that JExcel can write formatted cells. In formatted cells I mean that the text is italic,…
Gábor Csikós
  • 2,787
  • 7
  • 31
  • 57
2
votes
1 answer

Can't get proper encoding for JExcel/jxl

I have a problem of character encoding while using JExcel. My app creates an excel document from a template and fills it with with data from a database (filled with current and previous sessions user-input) before sending it to the user. In the…
FrenchFigaro
  • 371
  • 2
  • 18
2
votes
0 answers

JExcelAPI has deep copy feature using copyTo(col,row) method. Nothing find in Apache POI

JExcelAPI (jxl) has a deep copy feature using WritableCell.copyTo(int col, int row) method. I couldn't find anything like this in Apache POI . I need to copy the formula cells and formula should change relative way in the new cell using Apache…
2
votes
2 answers

JExcelApi: multiple formats in one cell?

In Excel, I can have multiple text styles in a single cell. Is there a way to create a file like this using JExcelApi? I'm not seeing anything so far: setCellFormat is a method on WritableCell, and there doesn't seem to be any way to set a format…
Ken
  • 1,066
  • 1
  • 10
  • 17
2
votes
2 answers

EmptyStackException for Formula parsing in jexcel

I am new to the jexcel api and have not yet successfully added a formula. Whenever I try to compile a formula I get the compile error: Exception in thread "main" java.util.EmptyStackException      at java.util.Stack.peek(Stack.java:102)      at…
2
votes
2 answers

Password protected xls/xlsx file in java

I have created password protected zip file which has xls file with the help of this http://java.sys-con.com/node/1258827. My question is ,Is there any java api which will create password protected xls file instead of zip file. I want to directly…
happy
  • 2,550
  • 17
  • 64
  • 109
1
vote
1 answer

Importing sheet using JExcelApi

Let me start by saying I'm very new to Java and to this site. I've read a book or two now and since then have been looking for small projects to keep myself entertained. I've tried to research this but I haven't been able to find the information I…
Atma
  • 63
  • 1
  • 5
1
vote
2 answers

Why [cols,rows] instead of [rows,cols]

Today I started using the JexcelApi and I bumped into this: When you try to get an element from a specific position, instead of using sheet.getCell(row,col) as you would normally expect, it is sheet.getCell(col,row). So if you'd like to print your…
Fofole
  • 3,398
  • 8
  • 38
  • 59
1 2
3
13 14