How to read xls file data uploaded from remote machine?
843840Sep 2 2009 — edited Sep 6 2009Hello All,
I am facing problem for reading data from Excel(xls) file uploaded from remote machine(by client).
It works fine when file is uploaded from local machine where app. server reside using same following code.
(extractorDataClass.getFilePath() this is giving us uploaded file path)
FileInputStream fis = new FileInputStream(new File(extractorDataClass.getFilePath().toString()));
POIFSFileSystem fs = new POIFSFileSystem(fis);
wb = new HSSFWorkbook(fs);.......................
It is working fine while reading data from local machine.
but giving problem while reading it remotely and giving exception mentioned below....
java.io.FileNotFoundException: D:\New Microsoft Excel Worksheet.xls (The system cannot find the file specified)
17:39:23,732 INFO [STDOUT] at java.io.FileInputStream.open(Native Method)
17:39:23,732 INFO [STDOUT] at java.io.FileInputStream.<init>(FileInputStream.java:106)
D:\New Microsoft Excel Worksheet.xls------- this is the path of remote client but it looks like local machine path.
So please suggest some solution....
Thanks and regards
Only1vinay