ASF Bugzilla – Attachment 24625 Details for
Bug 48294
setSheetOrder() breaks inter-sheet references
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Run this file; a spreadsheet with the problem is dumped to stdout.
SsoTest.java (text/plain), 903 bytes, created by
Joe
on 2009-11-26 10:41:10 UTC
(
hide
)
Description:
Run this file; a spreadsheet with the problem is dumped to stdout.
Filename:
MIME Type:
Creator:
Joe
Created:
2009-11-26 10:41:10 UTC
Size:
903 bytes
patch
obsolete
>/* > * If you run this code, you would expect cell A1 on "other sheet" > * to contain the formula "='sheet 1'!D3" and to display the value "30". > * Instead, it contains "='other sheet'!D3". > * Removing the setSheetOrder call fixes this. > * Fix: please mention this in the documentation for setSheetOrder() > */ >import java.io.*; >import org.apache.poi.hssf.usermodel.*; >public class SsoTest { > public static void main(String[] args) throws Exception { > HSSFWorkbook wb = new HSSFWorkbook(); > HSSFSheet s1 = wb.createSheet("sheet 1"); > HSSFSheet s2 = wb.createSheet("other sheet"); > > HSSFRow or1 = s2.createRow(0); > HSSFCell c2 = or1.createCell(0); > c2.setCellFormula("'sheet 1'!D3"); > > HSSFRow s1r1 = s1.createRow(2); > HSSFCell c1 = s1r1.createCell(3); > c1.setCellValue(30); > > wb.setSheetOrder("other sheet", 0); > > wb.write(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 48294
: 24625