on 10-22-2009 11:27 AM
HI Experts,
I have got one requirement to read the data from Microsoft PowerPoint slides.
I am trying in this way,
wd_context->get_attribute(
EXPORTING
name = `DATASOURCE `
IMPORTING
value = l_xstring ).
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
in_xstring = l_xstring
IMPORTING
out_string = l_string.
But it doesn't works. When i use the following code it is working for uploading and downloading the same document.
But i need to read the content from Slides.
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
EXPORTING
i_filename = 'DATASOURCE '
i_content = l_xstring
i_mime_type = 'ppt'.
i_in_new_window = ABAP_FALSE
i_inplace = ABAP_FALSE
If you have any point on this, please provide me.
with thanks in advance,
Kiruba
hi ,
check this thread
for thomas' reply
If you are going to want to read a file from the client machine, you need the fileUpload UI element. Once uploaded you will have a binary string with the raw contents of the document. Technically this is all you need to read a file from the frontend. But now comes the hard part. I don't think the PPT files are very easy to read. They use a propriatery, Microsoft created binary format. They aren't text based or XML based or anything else that would be easier to read in ABAP.
Microsoft does publish the specifications for the binary format:
http://www.microsoft.com/interop/docs/OfficeBinaryFormats.mspx#EOB
From the looks of the format, you will have to use Bit level processing in ABAP to read the file contents (possible, but a pain in the butt).
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
Thanks for your reply ...
I have already seen all threads regarding this.
But nowhere they mentioned it is possible or not.
i have already used the FM: HR_KR_XSTRING_TO_STRING
It is not working...
As it is of different format, it will be tuff i think.
Is there any other way of doing this?
with thanks ,
Kiruba.
>
> Hi Amit,
>
> Thanks for your reply ...
> I have already seen all threads regarding this.
>
> But nowhere they mentioned it is possible or not.
> with thanks ,
> Kiruba.
Actually I said exactly that it is possible, but very complicated. You aren't going to find a magic function module that extract the data. As stated already, PPT is a propriatery Microsoft binary format. You would have to follow Microsoft's specification to process and extract data from this format.
hi ,
as ur getting the data in Xsting , so use the FMs SCMS_XSTRING_TO_BINARY and SCMS_BINARY_TO_STRING
First convert the xstring to binary. SCMS_XSTRING_TO_BINARY
Then binary to string.
SCMS_BINARY_TO_STRING
It shud help
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.