bug 35084, reported by Stefano Rocca. fixed in Sheet.java
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353705 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
99fbaec5a3
commit
26c9e21e3b
@ -129,7 +129,7 @@ public class FormulaParser {
|
||||
|
||||
/** Recognize an Alpha Character */
|
||||
private boolean IsAlpha(char c) {
|
||||
return Character.isLetter(c) || c == '$';
|
||||
return Character.isLetter(c) || c == '$' || c=='_';
|
||||
}
|
||||
|
||||
|
||||
|
@ -388,6 +388,21 @@ public class TestFormulaParser extends TestCase {
|
||||
assertTrue("IntPtg",(ptgs[1] instanceof IntPtg));
|
||||
assertTrue("DividePtg",(ptgs[2] instanceof DividePtg));
|
||||
}
|
||||
|
||||
/** bug 35027, underscore in sheet name*/
|
||||
public void testUnderscore() {
|
||||
HSSFWorkbook wb = new HSSFWorkbook();
|
||||
|
||||
wb.createSheet("Cash_Flow");;
|
||||
|
||||
HSSFSheet sheet = wb.createSheet("Test");
|
||||
HSSFRow row = sheet.createRow(0);
|
||||
HSSFCell cell;
|
||||
|
||||
cell = row.createCell((short)0);
|
||||
cell.setCellFormula("Cash_Flow!A1");
|
||||
|
||||
}
|
||||
|
||||
public static void main(String [] args) {
|
||||
System.out.println("Testing org.apache.poi.hssf.record.formula.FormulaParser");
|
||||
|
Loading…
Reference in New Issue
Block a user