I'm trying to read in an excel file and using JExcel. I've done it two ways... one works and the other give me the error. I need it to read from the place where it says it can't find the file.
File inputWorkbook = new File("c:/resin/webapps/patriotmem/RMA.xls"); // DOESNT WORK
//File inputWorkbook = new File("c:/resin/webapps/patriotmem/RMA.xls"); // WORKS!!!! ??????
System.out.println("absolut path is " + inputWorkbook.getAbsolutePath());
try {
Workbook w = Workbook.getWorkbook(inputWorkbook);
Sheet sheet = w.getSheet(0);
rows = sheet.getRows();
......./// more
The error says...
props are C:\resin
absolut path is c:\resin\webapps\patriotmem\RMA.xls
jxl.read.biff.BiffException: The input file was not found
at jxl.read.biff.File.<init>(File.java:124)
at jxl.Workbook.getWorkbook(Workbook.java:221)
at jxl.Workbook.getWorkbook(Workbook.java:198)
at com.patriotmem.util.CreateExcelForRMA.createExcel(CreateExcelForRMA.j
ava:82)
I actually put the file in both places, but it can't only find it at the root resin directory. What could be the problem?
Thanks.