cancel
Showing results for 
Search instead for 
Did you mean: 

how to read and write excel file using apache poi? this program would run on Hana cloud platform.

Former Member
0 Kudos

In local program is recognizing file name. But it isn't working when it is deployed on SCP. I need help in understanding.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I did use InputStream rather than filename. It started working fine.

final InputStream fileInput = filePart.getInputStream();

XSSFWorkbook workbook = new XSSFWorkbook(fileInput);

Thank you,

Answers (1)

Answers (1)

richard-zhao
Employee
Employee
0 Kudos

Hello, Shaik. It there an error message show up? I think you should check your file path It might be the program is not able to find the excel files. thanks

Former Member
0 Kudos
org.apache.poi.openxml4j.exceptions.InvalidOperationException: Can't open the specified file input stream from file: 'TestExcel.xlsx' is the ERROR on SCP. Same program works fine in local host. I'm providing file name as input "XSSFWorkbook workbook = new XSSFWorkbook(new File(fileName))". 
Program is deployed on SCP from Eclipse I'm running on SCP.