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/06/03 18:17:25 UTC

DO NOT REPLY [Bug 42541] Problem with Formula cells.

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


vijay <vk...@njit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vkt3142@njit.edu
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #4 from vijay <vk...@njit.edu>  2008-06-03 09:17:24 PST ---
POI Version: poi-3.1-beta1-20080428.jar
-----------------------------------------------------------------
Sample Excel File: template_183.xls (Attached)
-----------------------------------------------------------------
Variable names within the excel file (template_183.xls):
-----------------------------------------------------------------
End_1st: =OFFSET(testsheet!$A$2,0,0,COUNTA(testsheet!$A:$A)-1,1)
End_Acct: =OFFSET(End_1st,,6)
End_Bal: =OFFSET(End_1st,,19)

JSP To Test: This jsp reads the excel file using POI and generates a copy of
the excel file.

+++++++++++++++++++++++++++++ JSP FILE
+++++++++++++++++++++++++++++++++++++++++
<%@ page import= "java.util.*,java.io.*"%>
<%
        String fromPath = "C:\\template_183.xls";
        String toPath2 = "C:\\template_183_POICOPY.xls";
        try{
                System.out.println("Before copyFilesUsingPOI");
                InputStream istream = new FileInputStream(fromPath);
                org.apache.poi.poifs.filesystem.POIFSFileSystem fs = new
org.apache.poi.poifs.filesystem.POIFSFileSystem(new
BufferedInputStream(istream));
                org.apache.poi.hssf.usermodel.HSSFWorkbook wb= new
org.apache.poi.hssf.usermodel.HSSFWorkbook(fs,true);
                FileOutputStream fileOut = new FileOutputStream(toPath2);
                wb.write(fileOut);
                fileOut.close();
                istream.close();
                System.out.println("After copyFilesUsingPOI");
                }catch(Exception e){
                        e.printStackTrace();
                }
%>
+++++++++++++++++++++++++++++ ENDJSP FILE
++++++++++++++++++++++++++++++++++++++
------------------------------------------------------------
Output: (template_183_POICOPY.xls)All the cells where the formula is copied
will show #value instead of the value in the original excel file. I am
attaching the output file as well.
------------------------------------------------------------

Could someone please look into this issue. The #value error in this scenario is
not resolved in the latest POI release.

Thank you.


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