cancel
Showing results for 
Search instead for 
Did you mean: 

inserting values into excel sheet

Former Member
0 Kudos

Hi Friends,

I am trying to install values into an excel sheet which is installed on my system using sap ep web dynpro

The ep server is also on the same system

I have created two fields in the excel sheet EMPID and EMPNAME which is saved on my system with the name empdetails.xls

Now I am trying to create a front end in NWDS which consists of couple of input fields and a button...when I enter the data in this input fields and hit the button data must get saved in the excel. I have created an action Lets say ACTION1

For this I have written the following code under

OnACTION1()

FileOutputStream fout = null;

File file=null;

try {

file=new File("C:/DESKTOP/empdetails.xls");

fout=new FileOutputStream(file);

String empId=wdThis.wdGetContext().currentContextElement().getEid();

String ename=wdThis.wdGetContext().currentContextElement().getEname();

fout.write(empId.getBytes());

fout.write(ename.getBytes());

} catch (Exception e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

//@@end

}

When I execute the above code I see the form being get displayed in the browser but when I enter the data in the input fields and hit the enter data is not getting stored in the excel sheet

I do not see any error message being displayed either

Please do tell me the prerequisities that I need to do before inserting the data

Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I think it would be better if you use POI from apache to acheive your goal.

http://poi.apache.org/

Regards

Ayyapparaj

Former Member
0 Kudos

hi

Is there any other way apart from

http://poi.apache.org/

Thanks in advance

Former Member
0 Kudos

not sure whats the exact requirement you have another option could be "CSV" .

Former Member