cancel
Showing results for 
Search instead for 
Did you mean: 

upload data from multiple worksheets of excel file into SAP by using MIME?

Former Member
0 Kudos

Hi all,

I'm trying to getting the data from a multiple worksheet excel file by usin the MIME Repository.

First of all i realizied it like [here|http://abap-explorer.blogspot.com/2008/12/upload-data-from-multiple-worksheets-of.html] in a normal ABAP Report.

By trying to transfer the code to a WebDynpro Component, i get problems.

With this part of code, because ActiveX is not allowed in our Webbrowser. So i have to find another solution to get the data from the excel file.

CALL METHOD c_oi_container_control_creator=>get_container_control
IMPORTING
control = iref_control
error   = iref_error

I tried to rebuild this solution in webdynpro. But it dont works.

So my next step was trying to Read the Excel sheet directly from MIME by getting the Content (XString).

But there is no useful information Just a mix out of '######' and other symbols.

By converting it into String the same problem.

Maybe someone has an idea how to rebuild [this code|http://abap-explorer.blogspot.com/2008/12/upload-data-from-multiple-worksheets-of.html] in Webdynpro that it works correctly.

Currently Im Using the Fileupload UI Element. All Works fine. I can Upload the Excel file to MIME Repository and i can open it from there.

But i cant get the same clear informationen from the file, to write it later in a Database, like before without webdynpro.

i hope someone can help me.

Edited by: Sascha Baumann on Apr 20, 2009 4:28 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can't read the native binary Excel Format in server side ABAP. The functions and classes that did this in Classic Dynpro used OLE Automation via the SAPGUI Control Framework to remotely control Excel to read the data. Because in the browser you have no connection to the SAPGUI or are sandboxed inside the browser; the same functionality is not possible.

I would suggest that you look into saving the Excel file as a open, text format. You might be able to use XML (although the Excel XML format can be complex) to support multiple sheets. You would have to build the logic yourself (using XSLT or the iXML parser) to process the XML format back into ABAP data.