cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Excel file

Former Member
0 Kudos

Hello,

I am reading an excel file using Apache POI API. When i read the excel it creates a copy in the server location of the same excel.

Is there any way where in I can aviod creating a file on server and just read the input excel without storing on server?

Regards

DK

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Wahts the JDK version, make sure you are using the correct version.

Also try to change the code and see if it helps.

Former Member
0 Kudos

HI Arun/Yugandhar,

Dipendra and myself are from same project, so we are facing same problem

We created a IWDResource object and then reading like this :

InputStream in = wdContext.currentContextElement().getFileResource().read(false);

HSSFWorkbook wb = new HSSFWorkbook(in);

However when we are trying to create an object 'wb', we are getting 'IO exception Bad File Number'.

Can you please help us.

Cheers,

Anup Batra

Former Member
0 Kudos

If we are reading the excel file with API, It wont create a new file.

Double check the code.If its still hapening, post the code that u have written for this.

p330068
Active Contributor
0 Kudos

Hi DK

Use the JXL API for the reading hte excel files :

Refer to SAP Wiki : [http://wiki.sdn.sap.com/wiki/display/WDJava/UploadingexcelfileusingWebDynproforJava |http://wiki.sdn.sap.com/wiki/display/WDJava/UploadingexcelfileusingWebDynproforJava]

Below check it the code used for the Excel download using Apache POI API, if you do not create the file in the sevver then it will not create it. Refer to below documnets:

[Reading Excel Data from Java Using HSSF API|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1405] [original link is broken] [original link is broken] [original link is broken];

[|]

Hope it will helps

Best Regards

Arun Jaiswal

Former Member
0 Kudos

This message was moderated.