Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

former_member980817
Discoverer
0 Kudos

Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

2 REPLIES 2

Florian
Active Contributor
0 Kudos

Hi Chhayank,

the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.

Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job

~Florian

Mohamed_Mukhtar
Active Contributor
0 Kudos

Hi Chhayank,

I was able to find lot of help by Googling. Please go through the below link to solve your issue.

http://www.an-sap-consultant.com/2012/12/sap-abap-how-to-get-leading-zeros-in-excel-attachment.html

Thanks