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 2015/04/27 15:23:57 UTC

[Bug 57861] New: Unreadable content after setCellFormula(null) and value used in another sheet

https://bz.apache.org/bugzilla/show_bug.cgi?id=57861

            Bug ID: 57861
           Summary: Unreadable content after setCellFormula(null) and
                    value used in another sheet
           Product: POI
           Version: 3.11-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: thorsen83@hotmail.com

After clearing a XSSFCell formula with setCellformula(null), if this cell is
used in another cell in other sheet, Excel claims "unreadable content" because
of the change. In the other hand, if it isn't used in other place, everything
goes fine.

-- 
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


[Bug 57861] Unreadable content after setCellFormula(null) and value used in another sheet

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

Dominik Stadler <do...@gmx.at> changed:

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

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Not sure if I understand completely what you are trying to do, but it is
probably not a good idea to "re-use" objects across rows/sheets as they have
links internally. Especially if you remove objects they should usually not be
used any more after that. 

If you think this is still a valid bug, then please post some code, preferably
in self-sufficient unit-test form so we can try to comment on it and/or
reproduce it locally.

-- 
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


[Bug 57861] Unreadable content after setCellFormula(null) and value used in another sheet

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

thorsen83@hotmail.com changed:

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

-- 
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


[Bug 57861] Unreadable content after setCellFormula(null) and value used in another sheet

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

thorsen83@hotmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

-- 
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


[Bug 57861] Unreadable content after setCellFormula(null) and value used in another sheet

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

--- Comment #4 from thorsen83@hotmail.com ---
The use case is a basic xlsx file with two sheets, one for data the other for a
graph. This xlsx file is used as a template, so everytime the app is asked to
generate a new graph it reads the template, sets cell values and evaluates
formula cells in order to generate the graph. Finally, the data sheet is hid
and the graph sheet selected as active and thus the app is able to send it to
printer and only get the generated graph.
In the data sheet, we have a final column with formulae that sometimes we want
to override with database-generated values and that's why we need to clear the
formulae. Those values or formulae are being used in the graph sheet and there
is where we're experiencing this bug. If we remove the graph sheet, Excel
doesn't have the unreadable content problem otherwise has.

Code used:

XSSFCell cell;

[...]
cell.setCellFormula(null);
cell.setCellValue(value);
[...]
XSSFFormulaEvaluator.evaluateAllFormulaCells(workbook);
workbook.setSheetHidden(workbook.getSheetIndex(dataSheet), true);
workbook.setActiveSheet(workbook.getSheetIndex(graphSheet));

-- 
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


[Bug 57861] Unreadable content after setCellFormula(null) and value used in another sheet

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

--- Comment #3 from thorsen83@hotmail.com ---
Created attachment 32690
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32690&action=edit
Template used to create the graph

-- 
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


[Bug 57861] Unreadable content after setCellFormula(null) and value used in another sheet

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

--- Comment #2 from thorsen83@hotmail.com ---
Created attachment 32689
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32689&action=edit
Template used to create the graph

-- 
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