ASF Bugzilla – Attachment 10909 Details for
Bug 27852
[PATCH] POI wrongly reports a name for a cell formula that references a name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Java test case to reproduce the problem
TestPOIFormulaBug.java (text/plain), 1.16 KB, created by
Brice Copy
on 2004-03-22 17:21:04 UTC
(
hide
)
Description:
Java test case to reproduce the problem
Filename:
MIME Type:
Creator:
Brice Copy
Created:
2004-03-22 17:21:04 UTC
Size:
1.16 KB
patch
obsolete
> >import org.apache.poi.hssf.usermodel.HSSFCell; >import org.apache.poi.hssf.usermodel.HSSFCellStyle; >import org.apache.poi.hssf.usermodel.HSSFDataFormat; >import org.apache.poi.hssf.usermodel.HSSFDateUtil; >import org.apache.poi.hssf.usermodel.HSSFName; >import org.apache.poi.hssf.usermodel.HSSFSheet; >import org.apache.poi.hssf.usermodel.HSSFWorkbook; > > >import java.io.FileInputStream; > >public class TestPOIFormulaBug >{ > public static void main(String[] args) > { > try > { > HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream("SimpleFormulaTestCase.xls")); > > ////////////// > // Here, the wb variable contains 4 names (instead of 2) > for(int i = 0 ; i < wb.getNumberOfNames() ; i++) > { > HSSFName name = wb.getNameAt(i); > // So far so good... > System.out.println("Name "+i+" : "+name.getNameName()); > > // Here, with invalid names, this line will cause an EmptyStackException > System.out.println(" - Reference : "+name.getReference()); > } > } > catch(Exception e) > { > System.out.println("Exception occurred : "+e); > e.printStackTrace(System.out); > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 27852
:
10908
| 10909 |
12353