cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve data from an Excel file which is located on server

Former Member
0 Kudos

hi everybody,

I am using SAP NWDS 2004s .

I have done an application on how to export the table data into an Excel .

Now i want to get the data from an Excel file which is located in server and display that data which is in excel in a View for example a Sample view in Webdynpro .

In Sample view i took a uielement textview to display the data ....

can any one help how to procced further

Thanks in advance

Madhavi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Options to read Excel data to WebDynpro context

Few Threads

regards

Vinod

Former Member
0 Kudos

Hi Madavi,

Firstly i want to know which API Did you use to export the data from back end to Excel sheet?

There are couple of APIs like IText, POI. If you can tell me the API probably i can help you.

Regards,

Arun.

Former Member
0 Kudos

hi,

I am using jxl library

Former Member
0 Kudos

Hi,

You can make use of following code

File f=new File(<excel file Name>);

Workbook w=Workbook.getWorkbook(f);

Sheet sh=w.getSheet(0);

int cols=sh.getColumns();

int rows=sh.getRows();

for(int i=0;i<rows;i++)

{

for(int j=0;j<cols;j++)

wdComponentAPI().getMessageManager().reportSuccess(" "+sh.getCell(i,j).getContents());

}

Regards

LN

srinivas_sistu
Active Contributor
0 Kudos

Hi,

Refere the below blog where it is explained including code also...

[Read From Excel|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/9183] [original link is broken] [original link is broken] [original link is broken];

Regards,

Srinivas.