cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading excel to webdynpro table

Former Member
0 Kudos

Hi,

I have a requirement to get the contents of an excel file and displaying it in a table. I have tried the code in scn but nothing works.

Can anyone please provide me the complete steps for this.

Thanks,

Murali Krishnan

Accepted Solutions (0)

Answers (2)

Answers (2)

psnn24
Explorer
0 Kudos

Hi Murali,

Please follow the article Uploading excel file using WebDynpro for Java. There it has been given step by step procedure for reading cells of excel file and uploading the same in WebDynpro table.

Reply with proper explanation if you have any problems.

Regards,

Prasanna

Former Member
0 Kudos

Hi Prasanna,

I am getting the below error while exporting the excel sheet to table


jxl.read.biff.BiffException: Unable to recognize OLE stream

Also am using NWDS 7.3 and in that I have used  Cell c1 = ((jxl.Sheet) sh).getCell(i,j); instead of  Cell c1 =  sh.getCell(i,j)

Regards,

Murali Krishnan

psnn24
Explorer
0 Kudos

Hi Murali,

To use the jxl.jar for reading excel, excel should be in '97-2003 workbook' format with extension '.xls'. if you use higher versions  you will get BiffException.

The code given in the article will work fine in NWDS7.3 also, no need to change anything.

But make sure you have pasted the jxl.jar file in proper location. follow javalangnoclassdeffounderror--not-again for more information where to copy jar file(only if you get build error or classNotFound exception in runtime).

Regards

Prasanna N

Former Member
0 Kudos

Hi prasanna,

Is it possible to send the below mentioned path name to RFC?

C:\Users\test\Desktop\test.xls

Regards,

Murali Krishnan

Former Member
0 Kudos

Hi Prasanna,

I am getting java.lang.nullpointerexception while exporting to table in webdynpro.

Help me with this.

Regards,

Murali Krishnan.

psnn24
Explorer
0 Kudos

Hi Murali,

You are using FileUpload UI element for uploading excel right?? if so you can upload from the location you specified. on upload a path name will be generated for the location where the file is stored in RFC. That path name you should take while reading the contents of excel. The steps are same if you are following the article Uploading excel file using WebDynpro for Java.

Regarding exception, can you please provide the trace of exception?

Regards,

Prasanna N

Former Member
0 Kudos

Hi Murali,

You have opened 2 threads for the same issue it seems.

I have replied already on the other thread that you need to write file to the server and then you can access it easily.

Please close one of them if you referring to the same issue.

Regards,

Archana

Former Member
0 Kudos

Hi Prasanna,

Now its working fine. The problem is I haven't set the path name correctly thats why it was throwing nullpointer exception.

Thanks for your help.

Regards,

Murali Krishnan.

Former Member
0 Kudos

Hi Prasanna,

Also the code is working only for Excel 97-2003 and what needs to be done to support other versions of excel sheet?

Regards,

Murali Krishnan.

junwu
Active Contributor
0 Kudos

use apache poi

vijay_kumar49
Active Contributor
0 Kudos

Murali,

Please go through this

http://scn.sap.com/thread/3415436

use apache  this poi (poi-bin-3.9-20121203.zip). this is poi is suitable for 2007 and 2010 versions

http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.9-20121203.zip

Hope this helps!!

Regards

Vijay Kalluri

junwu
Active Contributor
0 Kudos

you should debug to see why it is not working

it is so basic,