https://issues.apache.org/bugzilla/show_bug.cgi?id=49896

           Summary: issue with getCellFormula() Excel workbook name and
                    path in vlookup functions
           Product: POI
           Version: 3.5-FINAL
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
        AssignedTo: [email protected]
        ReportedBy: [email protected]


=> Create an excel file, say destn.xls with a column which has reference to
another excel file say source.xls (Give complete path to the source.xls -
something like - "=VLOOKUP(A1,'C:\[Source.XLS]Sheet1'!$A$2:$B$3,2,0)") 
=> Execute the following code:
java.io.FileInputStream fs= new java.io.FileInputStream("C:/test/Destn.xls");
org.apache.poi.ss.usermodel.Workbook wb =
org.apache.poi.ss.usermodel.WorkbookFactory.create(fs);
org.apache.poi.ss.usermodel.Sheet sheet = wb.getSheetAt(0);
Row row = sheet.getRow(1);
org.apache.poi.ss.usermodel.Cell cell = row.getCell(1);//assuming this cell has
the vlookup formula in your excel file
if(cell != null && cell.getCellType()==Cell.CELL_TYPE_FORMULA)
{
    System.out.println("Cell formula:"+cell.getCellFormula());
}

It gives result as VLOOKUP(A1,'[Source.XLS]Sheet1'!A:B,2,0)
The issue is because
org.apache.poi.hssf.record.SupBookRecord.decodeFileName(String) does not seem
to be implemented fully

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to