You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/11/10 08:00:30 UTC

DO NOT REPLY [Bug 46174] New: Unable to create references to cells in 3.2-FINAL

https://issues.apache.org/bugzilla/show_bug.cgi?id=46174

           Summary: Unable to create references to cells in 3.2-FINAL
           Product: POI
           Version: 3.2-dev
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: gauravsworld@gmail.com


The following snippet of code works perfectly in 3.1 but does not work in
3.2-FINAL. The code below is supposed to create a named reference to a cell but
doesn't do so.

HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("sheet");
sheet.createRow(0).createCell(0).setCellValue("abcd");
HSSFName name = wb.createName();
name.setNameName("HOLAHOLAHOLAH");
name.setReference("sheet!A1");
FileOutputStream fileOut = new FileOutputStream("t.xls");
wb.write(fileOut);
fileOut.close();

There is no mention in the changelog if there was a change to named references
so I assume this is an unintended change and hence a bug.

P.S. 3.2-FINAL does not appear in the version selection list above so I chose
3.2-dev instead.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46174] Unable to create references to cells in 3.2-FINAL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46174





--- Comment #2 from Gaurav Arora <ga...@gmail.com>  2008-11-10 06:00:34 PST ---
Created an attachment (id=22848)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22848)
Excel generated using 3.1-FINAL


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46174] Unable to create references to cells in 3.2-FINAL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46174





--- Comment #4 from Gaurav Arora <ga...@gmail.com>  2008-11-10 06:02:59 PST ---
(In reply to comment #1)
> Any chance you could upload the output files from 3.1 and 3.2, so we can do a
> quick diff and see what's different with them?
> 

The sheets are attached. Also, my excel version is 2003 (11.8105.8107) SP2.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46174] Unable to create references to cells in 3.2-FINAL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46174


Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yakimovich_dm@mail.ru




--- Comment #9 from Yegor Kozlov <ye...@dinom.ru>  2009-04-18 02:12:50 PST ---
*** Bug 30714 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46174] Unable to create references to cells in 3.2-FINAL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46174


Nick Burch <ni...@torchbox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




--- Comment #1 from Nick Burch <ni...@torchbox.com>  2008-11-10 01:42:41 PST ---
Any chance you could upload the output files from 3.1 and 3.2, so we can do a
quick diff and see what's different with them?


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46174] Unable to create references to cells in 3.2-FINAL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46174


Josh Micich <jo...@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WORKSFORME                  |FIXED




--- Comment #8 from Josh Micich <jo...@gildedtree.com>  2008-11-13 18:32:42 PST ---
Fixed in svn r713909 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=713909 )

Junit added.

The problem was that NameRecord had its own reference parsing logic that didn't
distinguish between relative and absolute cell references.  The easiest fix was
to replace this logic with the common formula parsing logic which has much
greater coverage of Excel formula syntax.  This has the benefit of allowing POI
to support defined names with any general formula.

I renamed(deprecated) the get/setReference methods because the name is
misleading.  Now you can use get/setFormula to the same effect.

Unfortunately, the formula parser does not support the union operator yet, so
there has been a slight regression in functionality.  For example,
hssfName.setFormula("Sheet1!A1:B2,Sheet1!C3:D4") will fail at the moment.  I'm
not sure if this functionality is of a high priority.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46174] Unable to create references to cells in 3.2-FINAL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46174





--- Comment #6 from Gaurav Arora <ga...@gmail.com>  2008-11-10 21:29:44 PST ---
After some more debugging, it appears that the named reference is available to
me in POI and I can access it elsewhere in the sheet. But for whatever reason
excel doesn't show the reference in the box on the top left corner when I click
on the cell A1. Can you see this reference in excel nick? What version of excel
are you using?


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46174] Unable to create references to cells in 3.2-FINAL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46174


Nick Burch <ni...@torchbox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |WORKSFORME




--- Comment #5 from Nick Burch <ni...@torchbox.com>  2008-11-10 09:56:40 PST ---
I'm seeing the named range defined in both of your files

The only difference I can spot is that the 3.1 version uses the $A$1 form of
reference, and 3.2 uses A1 (so absolute vs relative). However, both seem fine
otherwise


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46174] Unable to create references to cells in 3.2-FINAL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46174





--- Comment #3 from Gaurav Arora <ga...@gmail.com>  2008-11-10 06:01:08 PST ---
Created an attachment (id=22849)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22849)
Excel generated using 3.2-FINAL


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46174] Unable to create references to cells in 3.2-FINAL

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46174





--- Comment #7 from Nick Burch <ni...@torchbox.com>  2008-11-11 03:55:03 PST ---
I'm using Excel 2003 (11.8231.8221) SP3, and that sees the named range just
fine in both files

I think Josh might be investigating the $A$1 vs A1 thing


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org