poi

Create Excel Charts in Java

I've been using Apache POI to create and modify Excel spreadsheets, but I'm wondering if there is a way (even if it's with a different library, preferably open source) to create charts in Excel in the new xlsx format. It looks like POI has an HSSFChart but I believe that's for the older format (please correct me if I'm wrong). Has anyone...

Apache POI newLine problem

How can I generate XSLX document on UNIX with WIN newLine symbol? ...

How to overlay Camera view with POIs

Hi All, Without using Wikitude, I'm trying to find out how to overlay POIs over Camera. I have seen a few code samples that overlays POIs over MapView. How to do the same for Camera? Any clue/example code would be very much appreciated. To achieve my goal, can I add MapView on top of Camera Preview? If so how is it done? My MapView...

How to get more than 255 columns in an excel sheet using Apache POI 3.6

I'm creating a calendar in excel. Column 1 is 01.01.2010 (dd.MM.yyyy), Column 2 is 02.01.2010 and so on. This is my code: int day_cell = 0; for(int i = 0; i < days.size(); i++) { Date day = days.get(i); HSSFCell cell = row.createCell(day_cell++); cell.setCellValue(day.toString()); } When I get to column 256 POI thro...

POI dynamic templates

Hello, Can anyone tell me where do I find some useful documentation on handling copying rows, cells, columns from one excel file to another, using POI? I need to insert in one blank excel file, 2 or more templates from other files, dynamic. I also need to keep all the styles made for the group of cells that I copy. How can I do that? ...

Java apache poi setting the cell formula

I am try to set a cell formulat that references cells from other workbooks. However, when I open the programmatically generated workbook, the formula cells show up as #REF!. I print out the formulas that were generated in a log. If I cut and paste those into the cells, the numbers from the external workbooks is pulled in. Str...

JAVA Excel POI API: Problem

Hi All, I am using the Java POI package to access the excel files. I have an excel file for which i am updating the cell values. those values are being used in some other sheets (within the same excel file) however, when i open the file, those values don't updated. when i select the cell text and hit enter then all the remaining sheets g...

Password Protected Excel File

I have an excel spreadsheet that is password-protected. I need to open this spreadsheet and read the data from it. I've been attempting to use the POI API to no avail. A Java solution would be preferred but any ideas would be helpful. Edit: Yes, I have the password. The file is password protected in excel; a password must be entered to...

How can I use predefined formats in DOCX with POI?

I'm creating a docx generator with POI and would like to use predefined formats. Word includes several formats like Title, Heading 1..10 etc. These formats are predefined in every DOCX you create with Word. I would like to use them in my docx generator. I tried the following but the format was not applied: paragraph = document.createP...

Finding the last row in an Excel spreadsheet.

I'm trying to find the index of the last row in an excel spreadsheet using Apache's POI for Java. I thought this should be possible with getLastRowNum() or getPhysicalNumberOfRows() but they don't seem to give the right results. For example, I have a one line spreadsheet and these two functions return a value of 1140. Another two line...

Where to get apache poi port for .net

I would like to know if there is a website where I could download the Apache POI ported for .net? I already found this link in the web http://www.apache.org/~avik/dist/poi-2.5.1-dev-20040708.dll I also found a repository of poi.net from novel but it is quite old (2004) http://developer.novell.com/wiki/index.php/Poi.Net But the version...

Determine installed Microsoft Excel version using Apache POI

Good Day, I need to determine which version of Microsoft Excel is installed on a Windows PC. I'm working with Apache POI but can't figure out an easy way to do this. Anyone know if Apache POI has a built in functionality to do this? Any ideas how to do this using Java code? Thanks in advance. ...

Apache POI change format from xlt to xls

I opened some xlt-file with Apache POI, changed it and saved it as xls-file. But if I open result xls-file with Excel and click File -> Save as... the type of file still will be Template *.xlt. So I need to save xlt-file as xls (not only change name, but format). Used code: HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream...

Apache POI Comment Excel

I need to add a comment to an HSSF Cell in Excel. Everything works fine the very first time but if I open the same file and run the code again it corrupts the file. I've also noticed that I need to create a Drawing object on a Sheet only once: _sheet.createDrawingPatriarch(); If the line above gets executed more than once comments w...

to get columns from Excel files using Apache POI??

Hi, In order to do some statistical analysis I need to extract values in a column of an Excel sheet. I have been using the Apache POI package to read from Excel files, and it works fine when one needs to iterate over rows. However I couldn't find anything about getting columns neither in the API (link text) nor through google searching...

how to call the chart in excel using poi method?

i have an excel template and there was a chart there, I was confuse on how can I call that chart when I'm coding in vb.net.. Can anyone help me on how can I call the chart for me to set the new value to fill the chart.. It is possible to call? ...

Apache POI Time Cell

I need to detect, whether cell format is Date, Time or Datetime. My code is: if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) { if (DateUtil.isCellDateFormatted(cell)) { if ( ??? ) return "Time"; else if ( ??? ) return "Date"; ...

How can I access password protected Excel workbook in Java using POI api

I want to read from and write to password protected Excel files. How can I do so using Apache POI API. Thank You, ...

POI and Excel Lists or Tables.

Hi, There is a requirement to read multiple Excel "Lists" from one sheet in an Excel file. I need to know if there is an inbuilt method/api to obtain the dimensions of a list or deal with list specific data. At the bare minimum, is there a way of knowing the "headers" of the list and the number of rows contained in the list data? I wan...

How to read Excel cell having null values too in Java...???

I'm using Apache POI 3.6. I've a column which is blank. I want it has to be read and then to the next cell. Even if I could resolve NullPointerException problem I could not get to the next cell. Here's my code snippet : HSSFCell cell = row.getCell(c); String value = null; switch (cell.getCellType()) { case HSSFCell.CELL_TYPE_FORM...