RE: Apache POI -Protected sheet disables the Row/Column resize

2011-02-08 Thread Mamatha Kodigehalli Venkatesh
I tried searching previous posts specifically on Readonly behavior... I found the same... that it gets binded with sheet.protectSheet(""); to express the behavior. My below code sample shows that the columns that gets locked... and it does not allow me to resize the column width... Appreciate

RecordFormatException when reading a Excel file

2011-02-08 Thread Taro App
Hi, I get the following error when reading a Exel file with POI 3.7. Exception in thread "main" org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance at org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:65

Re: POI 3,7 sheet.shiftRows() corrupted the cells

2011-02-08 Thread hartford123
Is there any workaround to insert rows in sheet instead of shiftRows(), if this method is available in ss usermodel, I am wondering why it is not working properly, it could be a bug. -- View this message in context: http://apache-poi.1045710.n5.nabble.com/POI-3-7-sheet-shiftRows-corrupted-the-c

Re: POI 3,7 sheet.shiftRows() corrupted the cells

2011-02-08 Thread Nick Burch
On Tue, 8 Feb 2011, hartford123 wrote: Nick Burch-11 wrote: On Tue, 8 Feb 2011, hartford123 wrote: Could you create a junit test that uses the SS usermodel, which tries the shift + read trick on both HSSF and XSSF? From what you say, it should work with hssf, and fail for xssf. That unit test ca

Re: POI 3,7 sheet.shiftRows() corrupted the cells

2011-02-08 Thread hartford123
Nick Burch-11 wrote: > > On Tue, 8 Feb 2011, hartford123 wrote: > > Could you create a junit test that uses the SS usermodel, which tries the > shift + read trick on both HSSF and XSSF? From what you say, it should > work with hssf, and fail for xssf. That unit test can then be used to help

Re: POI 3,7 sheet.shiftRows() corrupted the cells

2011-02-08 Thread hartford123
This is the xml showing errors - http://schemas.openxmlformats.org/spreadsheetml/2006/main";> error033440_77.xml Errors were detected in file 'D:\Documents and Settings\xdbd138\Local Settings\Temporary Internet Files\Content.IE5\VDHUZB60\TDPTemplate[4].xlsm' - Removed Records: Merge c

Re: POI 3,7 sheet.shiftRows() corrupted the cells

2011-02-08 Thread Nick Burch
On Tue, 8 Feb 2011, hartford123 wrote: Here is the code I am using.Suppose when shiftRows() is done for 2 rows to shift down,ie from 47 to 49, then current row is showing 49 and if I want to start writing the content from 47, I am not able to read the row at 47 and it coming out as null. thus h

Re: [Charts creation]

2011-02-08 Thread Nick Burch
On Tue, 8 Feb 2011, rahul.soa wrote: Charts creation from Apache POI is possible from scratch? HSSF has some limited support in scratchpad, but more work is needed. Patches are very welcome! (You'll need to create some simple charts in excel, use biffviewer to see the records, then do some mo

Re: Formula Support in Apache POI

2011-02-08 Thread Mark Beardsley
Been habing a chat with a very experienced Excel user today and the consensus is that you have two options, both of which use Macros and VBA sadly. First, as it is not possible to call either a macro or create a message box directly from an Excel function/formula, you can create your own UDF (use

Re: POI 3,7 sheet.shiftRows() corrupted the cells

2011-02-08 Thread hartford123
Nick, you are right we were using HSSF and we upgraded to poi 3.7 and changed the code to SS user model so that it takes both XSSF and HSSF. Here is the code I am using.Suppose when shiftRows() is done for 2 rows to shift down,ie from 47 to 49, then current row is showing 49 and if I want

Re: [Charts creation]

2011-02-08 Thread rahul.soa
Hi Nick, Sorry, if it was already asked on the list. I'm just new to apache POI and also new for manipulation on excel sheet. My objective is to build a GUI tool, which has got several fields and two buttons on the bottom, one is "Insert" and another one is "Launch". With the insert button I inse

Re: POI 3,7 sheet.shiftRows() corrupted the cells

2011-02-08 Thread Nick Burch
On Tue, 8 Feb 2011, sujatha kalluri wrote: we upgraded from poi 2.5 to 3.7, sheet.shiftRows() is corrupting the cells, until shiftting the rows, excel sheet is fine, after shifting, it is corrupting the cells by merging them. This happened with .xlsm file (2007 macro enabled workbook) opened i

Re: Reading Cells formated with General as text data

2011-02-08 Thread Nick Burch
On Tue, 8 Feb 2011, John Francis wrote: The problem comes with the numeric values. Here POI reads the values and sets the cell type to be CELL_TYPE_NUMERIC. This returns the value as a double. The trouble is the code '366.0' is not the same code as '366' so I wish to get the value 'as entered'.

Reading Cells formated with General as text data

2011-02-08 Thread John Francis
I am using the SS user model org.apache.poi.ss.usermodel.* to read an XLS file. One column is formatted as "General" in Excel 2007 and contains data which is a series of user defined codes which can be purely alphabetic 'mycode' or numeric '123'. The problem comes with the numeric values. Here

POI 3,7 sheet.shiftRows() corrupted the cells

2011-02-08 Thread sujatha kalluri
we upgraded from poi 2.5 to 3.7, sheet.shiftRows() is corrupting the cells, until shiftting the rows, excel sheet is fine, after shifting, it is corrupting the cells by merging them.  Is it a bug in 3.7??  Do we have alternative to shiftRows() method? This happened with .xlsm file (2007 macro e

ConditionalFormatting with relative cells doesn't work as expected

2011-02-08 Thread patrick.bruehlmann
Hi . I'd like to build an excel which contains 2 identical columns. The second one is hidden. I wanted to add conditional formatting in order to change the format for every cell of the first column where the user changed the value. Building the excel sheet is ok, but at the end, the format will

Re: Formula Support in Apache POI

2011-02-08 Thread Mark Beardsley
The place to begin with all questions like this one is to ask how can it be done using Excel? When you know the answer to that question, you can look to emulate the same process using POI. Last night, I tried to do this with Excel itself and do not believe that it is possible using just the foruml