diff --git a/src/java/org/apache/poi/hssf/record/formula/FormulaParser.java b/src/java/org/apache/poi/hssf/record/formula/FormulaParser.java index 8f6da9da8..4c0cefe4f 100644 --- a/src/java/org/apache/poi/hssf/record/formula/FormulaParser.java +++ b/src/java/org/apache/poi/hssf/record/formula/FormulaParser.java @@ -62,6 +62,8 @@ import java.util.Stack; import org.apache.poi.hssf.usermodel.*; import java.io.FileOutputStream; +import java.io.File; + /** * EXPERIMENTAL @@ -438,7 +440,8 @@ end; System.out.println("Converted Text form is : "+fp.toFormulaString(fp.getRPNPtg())); try { short rownum = 0; - FileOutputStream out = new FileOutputStream("test.xls"); + File file = File.createTempFile("testFormula",".xls"); + FileOutputStream out = new FileOutputStream(file); HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet s = wb.createSheet(); HSSFRow r = null; diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java index c2bb655a2..080e977da 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java @@ -701,7 +701,7 @@ public class HSSFCell fp.parse(); Ptg[] ptg = fp.getRPNPtg(); 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++) { size += ptg[ k ].getSize(); rec.pushExpressionToken(ptg[ k ]);