cancel
Showing results for 
Search instead for 
Did you mean: 

Reading EXCEL file into WD

former_member82844
Participant
0 Kudos

I have the requirement to read a particular worksheet from a particular XLS spreadsheet into a webdynpro application. This data is used to update SAP 'Z' tables.

I have created a routine to open and read a sheet using OLE but this does not seem to work when called from webdynpro. I have also used the Upload File element but it creates a XSTRING and from what I can see there is no way to read this XSTRING into its contents for XLS.

I can also read a comma delimited file but the business does not want to have to export the XLS to comma delimted everytime.

Anyone have any suggestions> At this point I am looking at using standard SAP GUI as it seems to have the functionality required just not as pretty...

Glenn

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Glenn,

you are right about OLE.

It uses the GUI to talk to Excel.

Most standard functions that pick up the XLS data also use OLE to get at individual cells.

2 ideas:

a) USE sapgui and embed an HTML control shows your web dynpro.

See function wdy_execute_in_place.

OLE functions are still available now.

b) It maybe possible (I say maybe as I havent tried it) , to use the IOS factory class

available when in expert mode on UI element.

See interface IF_IOS_FACTORY.

From here get spreadsheet proxy IF_IOS_SPREASDHEET

I cant see any methods to provide cell level access to data ???

AS is possible for the OLE .

Otherwise as you see, the data is available in WDA but as XSTRING.

If you need to analyse the content and cant export as XML or csv,

then I would also stay with SAPGUI for cell level access via OLE.

regards

Phil

anand_nidamanuru
Active Participant
0 Kudos

Try using the SAP office control...for webdynpro...

Former Member
0 Kudos

Hi,

where I can find documentation.

Best regards

Oliver Prodinger

Former Member
0 Kudos

Hi,

<a href="http://help.sap.com/saphelp_nw70/helpdata/en/d1/af8841349e1909e10000000a155106/frameset.htm">OfficeControl</a>

See also the examples in the system, in package SIOS.

Regards, Heidi