ASF Bugzilla – Attachment 11985 Details for
Bug 29849
multiple setCellFormula to same cell do not write to file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Source file demonstrating bug.
FormulaTest.java (text/plain), 1.14 KB, created by
Chris Cheshire
on 2004-06-28 16:52:51 UTC
(
hide
)
Description:
Source file demonstrating bug.
Filename:
MIME Type:
Creator:
Chris Cheshire
Created:
2004-06-28 16:52:51 UTC
Size:
1.14 KB
patch
obsolete
>import java.io.FileOutputStream; >import java.io.IOException; >import org.apache.poi.hssf.usermodel.HSSFCell; >import org.apache.poi.hssf.usermodel.HSSFRow; >import org.apache.poi.hssf.usermodel.HSSFSheet; >import org.apache.poi.hssf.usermodel.HSSFWorkbook; > >public class FormulaTest { > > public static void main(String[] args) { > HSSFWorkbook wb = new HSSFWorkbook(); > HSSFSheet sheet = wb.createSheet(); > HSSFRow row = sheet.createRow(0); > > // A1 > HSSFCell cell = row.createCell((short)0); > > cell.setCellValue(5); > cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC); > > // B1 > row = sheet.createRow(1); > cell = row.createCell((short)0); > > for (int i = 0; i < 5; i++) { > cell.setCellFormula("A1*" + i); > System.out.println(cell.getCellFormula()); > } > > > try { > FileOutputStream outStream = new FileOutputStream("formulatest.xls"); > wb.write(outStream); > outStream.close(); > } > catch (IOException ex) { > ex.printStackTrace(); > } > > } > >}
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 29849
: 11985