cancel
Showing results for 
Search instead for 
Did you mean: 

Upload ed file's data?

former_member202077
Participant
0 Kudos

Hello

By using FileUpload UI element, i am UPLOADing my_microsoft_word_2010_DOCX file into my_WDA, fine. And am getting the data in XSTRING format, fine.

Now, i want to play around with this data (XSTRING, my_microsoft_word_2010_DOCX file's text), pls. let me know how can convert this XSTRING to Human readable format in my_WDA?

Pls. note tthis is MS-Word 2010 DOCX file

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

As far as i know the best way is to use the office control UI to edit your doc,xls files.

Store the xstring in a context attribute , point the office UI data source to this context attribute.

former_member202077
Participant
0 Kudos

Thank you.

I tried that option, but, when tested my WDA (from SE80), am getting the below ribbon

 "An add-non for this website failed to run. Check the security settings in the internet options for potential conflicts"

I knew its some thing to do with IE, but, our helpdesk folks are asking the specific add-on name here so that they will install/download it in my machine(compnays laptop)

By chance do you know the add-on name here?

Thank you

Former Member
0 Kudos

to run office control , ActiveX must be activated in the browser.

See this for reference [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d1/af8841349e1909e10000000a155106/content.htm|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d1/af8841349e1909e10000000a155106/content.htm]

Answers (1)

Answers (1)

ChandraMahajan
Active Contributor
0 Kudos

Hi,

Use below coding,

DATA: loc_conv TYPE REF TO cl_abap_conv_in_ce,

loc_xstring TYPE xstring,

loc_string TYPE string.

  • Convert XString to String

CALL METHOD cl_abap_conv_in_ce=>create

EXPORTING

input = lv_filecontent "type XSTRING

encoding = 'UTF-8'

replacement = '?'

ignore_cerr = abap_true

RECEIVING

conv = loc_conv.

*Read the file contents

TRY.

CALL METHOD loc_conv->read

IMPORTING

data = file_content. "loc_string.

CATCH cx_sy_conversion_codepage.

*-- Should ignore errors in code conversions

CATCH cx_sy_codepage_converter_init.

*-- Should ignore errors in code conversions

CATCH cx_parameter_invalid_type.

CATCH cx_parameter_invalid_range.

ENDTRY.

*Put the contents into String table

SPLIT file_content AT crlf INTO TABLE it_string.

Thanks,

Chandra

former_member202077
Participant
0 Kudos

Thank you.

But, am getting some junk values in loc_string and tehre by into it_string table!

THis is MS-Word 2010 with DOCX extension.

Pls. help

former_member202077
Participant
0 Kudos

Any help pls. I am getting junk values for the MS-Word 2010 file, extension is DOCX

Thank you

former_member202077
Participant
0 Kudos

Any help pls.

Thank you