Sam
Sam

Reputation: 2432

How to read excel sheet stored on application server

How can I read an Excel file stored on an application server?

I have read this and most of the solutions which I have gone through show to read it from a physical location of the local computer.

I would like to read it from an application server. Can someone suggest how to achieve this?

Upvotes: 0

Views: 3778

Answers (2)

Paul Vargas
Paul Vargas

Reputation: 42010

You can use Apache POI for read the file. e.g.:

InputStream inputStream = new URL("http://localhost/report.xls").openStream();

//Get the workbook instance for XLS stream
HSSFWorkbook workbook = new HSSFWorkbook(inputStream);

See also Read / Write Excel File In Java Using Apache POI.

Upvotes: 6

Thom
Thom

Reputation: 15042

You really have two different problems: reading the excel spreadsheet and reading a file from a server. I doubt you're going to find a tool for both. I would download the file to a temporary file and then read that using your Excel reader. Divide and conquer.

Upvotes: 0

Related Questions