cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with an Excel Attachment - Mail adapter

Former Member
0 Kudos

Hello.

I have a problem when I want to attach an excel file. I have configured the communication channel for sending mails with mail package.

I have done the configuration in order to get an excel file. If I test the scenario with Content_Type "text/html" I recieve correctly the information in the mail body.

When I test the scenario with Content_Type "application/vnd.ms-excel", html tags (like: <br>, &nbsp;, &amp;) are not converted. The file is attached as xls, but not converted correctly.

For example, with Content_Type "text/html":

Orders:

1 00023 ER123

2 89798 EHJ21

With Content_Type "application/vnd.ms-excel":

Orders:&lt;br&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;00023&amp;nbsp;&amp;nbsp;&nbsp;ER123"&lt;br&gt2&amp;nbsp;&amp;nbsp;&amp;nbsp;89798&amp;nbsp;&amp;nbsp;&amp;nbsp;EHJ21

I have tested with Content_Type for Word files and I have the same error too.

Do I have to set some special charset in the Content_Type?

Is this an Excel error?

Thanks in advance.

Edited by: Alejandro Maldonado Quezada on Apr 6, 2009 6:28 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

Hi,

Content_Type "text/HTML" is able to convert the html tags into the desired format....however others will display your code as is or in some other undesired format.....seems you need to use some other format-conversion parameters other than html if not using text/html

Any specific reason for not using text/html??

Regards,

Abhishek.

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos

try content type as application/msexcel

Former Member
0 Kudos

Hello Shabarish,

I have also tried with this content types and they don't resolve the problem.

application/vnd.ms-excel

application/x-msexcel

application/ms-excel

application/msexcel

application/x-excel

Thanks

jagesh_lakdawala
Active Participant
0 Kudos

Hi,

I had a scenario like SAP R3 - XI - Mail receiver.

I have generated the Excel file attachment with the following details.

Content-Type:- application/vnd.ms-excel;name="Filename.CSV".

Content: - Field1,Field2,Field3,NewLineCharacter,Field4,Field5,Field6.

Content-disposition = attachment

In R3 NewLineCharacter = CL_ABAP_CHAR_UTILITIES=>NEWLINE.

Select KEEP ATTACHMENT option in Mail receive adaptet config.

Excel file Filename.CSV was generated as attachment as follow.

Field1 Field2 Field3

Field4 Field5 Field6

Regards,

Jagesh