poi

converting a numeric cell type into a text cell type in ms excel document without changing contents of the cell using open office.

How to convert a numeric cell type into a text cell type in ms excel document without changing contents of the cell using open office. This cell value is then accessed using java (POI JAR getRichStringCellValue() method of HSSFCELL Object). ...

How can get the sum of different cell values in excel using POI

Hi to every one. i got requirement like,i created Excel sheet using POI.In that excel i have row one and row two,each row containg three cells with different value,like row two contains same. how can i add the r0c0+r1c0+r2c0 value into a anothe cell. is there any API for that. if any come across the solution please help me. ...

All images on sheet disappear when I call getDrawingPatriarch...

Hi, everybody! I have an excel template with images... When I simply populate it with data everything works fine. But I need programmaticly to add comments to cells sometimes, and the only way I found is to use HSSFPatriarch. But when I call HSSFSheet.getDrawingPatriarch() all images on sheet disappear... So the question is: 1. Is there...

Removing a row from an Excel sheet with Apache POI HSSF

I'm using the Apache POi HSSF library to import info into my application. The problem is that the files have some extra/empty rows that need to be removed first before parsing. There's not a HSSFSheet.removeRow( int rowNum ) method. Only removeRow( HSSFRow row ). The problem with this it that empty rows can't be removed. For example: ...

How to read text containing bullets from a table row inside a word doc using POI

HI, I am trying to read a word doc that contains a table using POI. The requirement is to create rows in a Database Table with the information extracted from the table rows in the word document. For example, my word doc has a table like: Heading Description Heading1 summary related to heading1 Heading2 summary related to heading2 ........

Apache POI - error in reading excel file

I am using poi-3.5-beta5 to read excel file. I am trying to open excel file through XSSFWorkbook workBook = new XSSFWorkbook (xlsPath); i am getting following error (although i am not using log4j) Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger at org.apache.poi.openxml4j.opc.Package.(Package.java:...

Open source POI database?

Is there a good free POI database (i'm thinking mainly public places like cinemas, shops, etc). OpenStreetMap would seem like a good source, but I haven't worked out how to download the POI database. ...

Excel 2007(.xlsx) Reading code using POI 3.5 in java?

Hi, I have downloaded latest POI version 3.5. I want to read the Excel file (.xlsx format) using the POI. If anybody has any Example source code or any URL or any other code snippet which can read the Excel file (.xlsx format) using the latest version of POI,which would be appreciated. Thanks, Mishal Shah ...

POI 3.5 WorkBook Exception for XML creation?

Hi, I have downloaded latest POI 3.5 and tried to run sample application for creation of excel sheet.But it is always giving error while exceuting some code like: enter code here Workbook wb = new XSSFWorkbook(); //or new HSSFWorkbook(); Generated Exception all the time is: Exception in thread "main" java.lang.NoClassDefFoundEr...

how to setup mkmapview to display pois at 100 meters range from my current location?

i have 200 pois in my app. i want to display the nearest pois to the user within 100 meters range in a mapview. How is this possible? ...

HSSFCellStyle to HTML CSS style

Hi, i am trying to convert an excel workbook to HTML page. The plan is to make the HTML as close possible replica of the excel sheet as possible. For this, i need to migrate the style settings for each Cell (HSSFCellStyle) to CSS. The first thing that came to my naive mind is that if there is a library avaiable to do this conversion, m...

Preserve images in Excel headers using Apache POI

I am trying to generate Excel reports using Apache POI 3.6 (latest). Since POI has limited support for header and footer generation (text only), I decided to start from a blank excel file with the header already prepared and fill the Excel cells using POI (cf. question 714172). Unfortunately, when opening the workbook with POI and writ...

Issues and gotchas with new POI 3.6 API (XSSF) working with Excel 2007 workbooks

I just started using the new POI 3.6 http://poi.apache.org XSSF which was released in December 2009. The updated API provides support for reading and writing in the OOXML spreadsheet format (.xslx) with Java. So far I've been pretty impressed with the API and haven't really encountered any issues with it. What issues or gotchas have you...

poi wrong date formula value calculated.

I have the following code public boolean processCell(boolean hasData, StringBuffer rowData, Cell cell) { switch (cell.getCellType()) { case Cell.CELL_TYPE_FORMULA: { try { this.evaluator.clearAllCachedResultValues(); switch (this.evaluator.evaluateFormulaCell(cell)) { case XSSFCell.CELL_TYPE_NUME...

Is there a way to add an image to a Cell using the POI Api?

I'm making an application that converts our data structure to an excel file. We're currently using POI to do the conversion. The problem is that the Cell only supports Strings, Numbers and formulas, and our data structure supports images. Is there a way to add images to cells? ...

POI 3.6- XSSF API how can I lock specific user edit actions on a given Excel 2007 sheet?

I'm using the POI 3.6-XSSF API to write Excel 2007 documents, and i'm having trouble getting specific user edit actions of a given sheet to lock (i.e. lockDeleteRows). The API says that you need to call enableLocking() on the sheet but when I do that it locks everything and ignores my specific locking settings (example below). When I don...

Excel POI 3.5 WorkBook Java Heap Space Exception ?

Hi, I am using latest POI 3.5 for Excel reading . I have Excel MS office 2007 installed and for that poi is providing XSSF for executing the data. For 15000 lines of data it is executing properly , but exceeding the limit till 30000 or 100000 or 200000 , it is prone to java heap space exception. code is below : enter code here UA...

Apache POI HWPF Nested Lists?

Hi, I used the following code to read list structures from a word file using hwpf. My question is how to read a list structure that is nested ie a list within a list within a list and so on. if (p instanceof ListEntry) { ListEntry entry = (ListEntry) p; outText = entry.text(); outText = ...

How to replace POI images in the ARView

Hi, I'm running an Wikitude application which shows the point if Interest (POIs). When the application starts, I click a button to launch ARView (AUgmented Reality) and there I could see the POI images superimposed on the Live Camera images. Now I want to change those images at frequent intervals. I'm using : // Need handler for c...

POI: column-wide trigger

I am new to apache.POI and I cannot find the way to generate a xls file using only POI which implements the standard Excel feature Conditional Formatting -> Highlight Cell Rules -> Duplicate Values. All I can do is to create a certain amount of Conditional Formatting Rules and bind them to a fixed number of cells (e.g. 200). This will ...