mirror of https://github.com/apache/poi.git
Fixes for formulas
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352502 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8f450536b6
commit
84dde18c80
|
@ -62,6 +62,8 @@ import java.util.Stack;
|
||||||
|
|
||||||
import org.apache.poi.hssf.usermodel.*;
|
import org.apache.poi.hssf.usermodel.*;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EXPERIMENTAL
|
* EXPERIMENTAL
|
||||||
|
@ -438,7 +440,8 @@ end;
|
||||||
System.out.println("Converted Text form is : "+fp.toFormulaString(fp.getRPNPtg()));
|
System.out.println("Converted Text form is : "+fp.toFormulaString(fp.getRPNPtg()));
|
||||||
try {
|
try {
|
||||||
short rownum = 0;
|
short rownum = 0;
|
||||||
FileOutputStream out = new FileOutputStream("test.xls");
|
File file = File.createTempFile("testFormula",".xls");
|
||||||
|
FileOutputStream out = new FileOutputStream(file);
|
||||||
HSSFWorkbook wb = new HSSFWorkbook();
|
HSSFWorkbook wb = new HSSFWorkbook();
|
||||||
HSSFSheet s = wb.createSheet();
|
HSSFSheet s = wb.createSheet();
|
||||||
HSSFRow r = null;
|
HSSFRow r = null;
|
||||||
|
|
|
@ -701,7 +701,7 @@ public class HSSFCell
|
||||||
fp.parse();
|
fp.parse();
|
||||||
Ptg[] ptg = fp.getRPNPtg();
|
Ptg[] ptg = fp.getRPNPtg();
|
||||||
int size = 0;
|
int size = 0;
|
||||||
System.out.println("got Ptgs " + ptg.length);
|
//System.out.println("got Ptgs " + ptg.length);
|
||||||
for (int k = 0; k < ptg.length; k++) {
|
for (int k = 0; k < ptg.length; k++) {
|
||||||
size += ptg[ k ].getSize();
|
size += ptg[ k ].getSize();
|
||||||
rec.pushExpressionToken(ptg[ k ]);
|
rec.pushExpressionToken(ptg[ k ]);
|
||||||
|
|
Loading…
Reference in New Issue