on 09-03-2008 9:35 AM
Hello,
I wrote an application, which exports the data from an internal table into an excel file.
I defined a variable as char20. The variable contains the value '000256'.
When I generate the excel file, the leading zeros are cut and so only the value 256 is stored into the cell.
Is it possible to prevent the cut of the zeros?
Best regards & Thanks in advance
Here is a part of may code:
conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ).
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = gv_content
IMPORTING
buffer = gv_xtext.
attach the first file
conv_out->convert( exporting data = gv_xtext ).
cl_wd_runtime_services=>attach_file_to_response(
i_filename = 'file1.XLS'
i_content = gv_xtext
i_mime_type = 'application/msexcel'
i_in_new_window = abap_true
i_inplace = abap_true ).
you could add an apostrophe ' in front of all fields that you want exported as a text.
this will ensure no truncating is done.
it's excel that does the shifting, so you can't really interfere from the SAP side
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 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.