Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to read xls file data uploaded from remote machine?

843840Sep 2 2009 — edited Sep 6 2009
Hello 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2009
Added on Sep 2 2009
6 comments
671 views