Re: NPV bug?

2010-12-08 Thread Marcel May
Thx Jon and David. I added the patch fixing NPV to the ticket. Jon, let me know if the patch does not work. There's a simple JUnit test case included, too. Cheers, Marcel On Dec 9, 2010, at 8:28 AM, Jon Svede wrote: > I created issue #50437 and attached my .xls file. Marcel can work from that

Re: NPV bug?

2010-12-08 Thread Jon Svede
I created issue #50437 and attached my .xls file. Marcel can work from that and submit his test case or I can create one. Jon - Original Message From: Jon Svede To: POI Users List Sent: Wed, December 8, 2010 9:10:40 PM Subject: Re: NPV bug? Hi all, Sorry for the delay in res

Re: NPV bug?

2010-12-08 Thread Jon Svede
I just re-read this, so yes, I will create a bug and upload my test file. Marcel can then attach the patch/test case as needed. Thanks! Jon - Original Message From: Marcel May To: POI Users List Sent: Wed, December 8, 2010 3:33:54 PM Subject: Re: NPV bug? I can confirm this is a

Re: NPV bug?

2010-12-08 Thread Jon Svede
Hi all, Sorry for the delay in responding. I can create the ticket and the test case, I'll try to get to this by the end of the week. Thanks for the confirmation! Jon - Original Message From: David Fisher To: POI Users List Sent: Wed, December 8, 2010 5:42:15 PM Subject: Re: N

Re: NullPointerException in org.apache.poi.xssf.usermodel.XSSFRichTextString.getLengthOfFormattingRun

2010-12-08 Thread Nick Burch
On Tue, 7 Dec 2010, sanjeev.x.verma wrote: CTRElt r = st.getRArray(i); if(r != null && r.getT() != null && i == index) return r.getT().length();//<< I'm not sure why r.getT() would return null, so we'll need to see the file to be sure

Re: NullPointerException in org.apache.poi.xssf.usermodel.XSSFRichTextString.getLengthOfFormattingRun

2010-12-08 Thread Nick Burch
On Tue, 7 Dec 2010, sanjeev.x.verma wrote: Since the exception was being thrown while generating a excel file from a datasource, I am afraid i do not have a file that you could use as a test case. Could you generate the file without the autosize step, then share that? Nick --

Re: Updating an embedded Excel file inside Word

2010-12-08 Thread Nick Burch
On Wed, 8 Dec 2010, Aram Mirzadeh wrote: Let me make sure I'm on the right path here, because this isn't sticking in my head yet. 1. Open the docx 2. Get all embedded part as pPart 3. Use pPart.getPartName().getName() to get the name of the embedded file. You might want to do this with relati

Re: XSSF text extraction

2010-12-08 Thread Nick Burch
On Wed, 8 Dec 2010, Matt Rogghe wrote: I've used both my own extractor and the built in XSSFEventBasedExcelExtractor. In either case the output yields only data from number or date columns. All character/string columns return null. Example code for using the latter: If you use the usermode

Re: NPV bug?

2010-12-08 Thread David Fisher
Hi Marcel, Please have a look at http://poi.apache.org/guidelines.html in the "Submitting Patches" section. Thanks and Regards, Dave On Dec 8, 2010, at 2:46 PM, Marcel May wrote: > > > Oops, the patch got swallowed. > > On Dec 9, 2010, at 2:33 AM, Marcel May wrote: > >> I can confirm this

Re: NPV bug?

2010-12-08 Thread Marcel May
Index: src/java/org/apache/poi/ss/formula/functions/Npv.java === --- src/java/org/apache/poi/ss/formula/functions/Npv.java (revision 1043675) +++ src/java/org/apache/poi/ss/formula/functions/Npv.java (working copy) @@ -17,

Re: FW: Formatting a cell as date while preserving other formatting associated with that cell.

2010-12-08 Thread Aram Mirzadeh
I just did this in 3.7-release and it worked for me. The cell kept the existing style (which was just bolded). Just a note that I use SS style to be consistent, rather than switch back to XSSF as you have done here. Aram On 12/8/2010 4:14 PM, Rohan Grover wrote: Hello all, I am tryi

XSSF text extraction

2010-12-08 Thread Matt Rogghe
Howdy folks, running into an issue extracting text from an .xlsx file. I've used both my own extractor and the built in XSSFEventBasedExcelExtractor. In either case the output yields only data from number or date columns. All character/string columns return null. Example code for using the la

Re: NPV bug?

2010-12-08 Thread Marcel May
I can confirm this is a bug - just had the same problem. a) the NPV computation is wrong - sum += ds[i] / Math.pow(rate + 1, i); + sum += ds[i] / Math.pow(rate + 1, i+1); I think the computation should actually use the FinanceLib#np

FW: Formatting a cell as date while preserving other formatting associated with that cell.

2010-12-08 Thread Rohan Grover
Hello all, I am trying to update a Cell in a Sheet in a XSSFWorkbook with GregorianCalendar value. The cell is already formatted with an inbuilt 'Format as table' style. I know I have to setDataFormat for that cell to get the date displayed as 'm/d/yy h:mm' and I would like to do that while

Re: NPV bug?

2010-12-08 Thread Yegor Kozlov
Sounds like a bug. Can you create a new bug in bugzilla, and upload the file and a sample code that shows the problem? Ideally it would be a junit test case. Yegor On 12/7/2010 7:44 PM, Jon Svede wrote: I've attached a simple example of my issue but here is the description. I have a spreads

Re: Updating an embedded Excel file inside Word

2010-12-08 Thread Aram Mirzadeh
On 12/7/2010 7:56 PM, Nick Burch wrote: On Tue, 7 Dec 2010, Aram Mirzadeh wrote: On 12/7/2010 12:47 AM, Nick Burch wrote: On Sun, 5 Dec 2010, Aram Mirzadeh wrote: I'm trying to update the values for the excel chart. I can read the docx, get the embeded object, and read and modify the cells