‎2010 Oct 07 9:08 AM
Hi,
I am converting my report output to XLS format using the CL_BCS class. I am converting my string into binary content and adding it as a xls attachement.
cl_bcs_convert=>string_to_solix(
EXPORTING
iv_string = lv_string
iv_codepage = '4103'
iv_add_bom = 'X'
IMPORTING
et_solix = binary_content
ev_size = size ).
*add attachment
document->add_attachment(
i_attachment_type = 'xls'
i_attachment_subject = 'Output'
i_attachment_size = size
i_att_content_hex = binary_content ).
I am able to email the generated excel file but if my column hold numbers with more digtis (ie, 1234567891234 , displayed as 1.23457E+12), its getting displayed as exponent format.
pl guide me on handling this im my program itself.
Regards,
BG
‎2010 Oct 07 9:40 AM
Hi
I tried using your example and also added some more digits to it and I realised the error works this way - if it is a 13 digit number 1234567891234
The error will be 1.23457E+12 and similarly anything bigger like say 15 digit will have 14 after the plus.
I changed the formatting to number and it worked. So I believe this can be reported as a bug in Excel.
Rgds
‎2010 Oct 07 1:30 PM
Hi BG,
Try declaring the column of internal table as CHAR type, instead of a numeric field.
Regards,
Nisha Vengal.
‎2011 Nov 07 5:31 AM
Dear all,
I am using the same ABAP code and do the same purpose. but in received Excel attachment, when the field content should be "1E2", it displays as "1.00E02" ; when it shold be "1E8", displays as "1.00E08". but when it is "1ED" or "1EY", it displays correctly.
looking forwarding to your reply
‎2012 Jan 29 9:08 AM
Dear all,
I meet the same problem as yours,
You could try Cl_ixml class to make it as formatted Excel. http://wiki.sdn.sap.com/wiki/display/Snippets/FormattedExcelasEmailAttachment
need to use MXL to control its format and data,
it works for me, but increase the file size.
Peter Ding