ASF Bugzilla – Attachment 6632 Details for
Bug 20321
"NO IDEA SHARED FORMULA EXP PTG" appears when read copy/paste formula
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Code
SCNExcel.java (text/plain), 1.14 KB, created by
Danny Mui
on 2003-06-04 15:11:01 UTC
(
hide
)
Description:
Code
Filename:
MIME Type:
Creator:
Danny Mui
Created:
2003-06-04 15:11:01 UTC
Size:
1.14 KB
patch
obsolete
>import org.apache.poi.poifs.filesystem.*; >import java.io.*; >import java.util.Vector; >import org.apache.poi.hssf.usermodel.*; >import com.ibm.bisc.ebiz.base.*; >/** > * Insert the type's description here. > * Creation date: (2003-3-23 17:35:41) > * @author: hwc > */ >public class SCNExcel { >/** > * SCNExcel constructor comment. > */ >public SCNExcel() { > super(); >} >public static void main(java.lang.String[] args) { > // Insert code to start the application here. > try { > POIFSFileSystem fs = > new POIFSFileSystem(new FileInputStream("e:\\2.xls")); > HSSFWorkbook wb = new HSSFWorkbook(fs); > HSSFSheet sheet = wb.getSheet("Sheet1"); > HSSFRow row = sheet.getRow((short)2); > HSSFCell cell = row.getCell((short)3); > String f = cell.getCellFormula(); > System.out.println("formula = " + f); > double d = cell.getNumericCellValue(); > cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC); > cell.setCellValue(44.0); > //cell.setCellFormula(f); > > FileOutputStream fileOut = new FileOutputStream("e:\\3.xls"); > wb.write( fileOut ); > fileOut.close(); > }catch (Exception e ) { > e.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 20321
:
6630
|
6631
| 6632 |
15330