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: 

Excel attachment via email without prompting any message

Former Member
0 Kudos

Hi All,

I am looking for a sample code or any way which will send itab as attachment to external email. I know a lot of threads on this, the challenging part is when third party open the attachment it shouldn't prompt any message such as (YES/NO/Help confirmation) e.g. (" The file you are trying to open,.....Do you want to open this file now?" ) . Please see below. it should not ask as below, and the file should he .XLS.

Any help will be highly appreciated.

Thanks.

1 ACCEPTED SOLUTION

former_member206395
Participant
0 Kudos

Hello,

Using the standard method, a tab dilimited file is created. For versions of office 2007 and above this file is still a text file with tab dilimited data rather than an .XLSX file/.XLS file.

Kindly go through the below link which talks about the open source free downloadable objects which will solve your problems quickly,

Link: http://scn.sap.com/community/abap/blog/2010/07/12/abap2xlsx--generate-your-professional-excel-spread...

12 REPLIES 12

arindam_m
Active Contributor
0 Kudos

Hi,

This is a Excel level message. I don't think you can suppress it when using extension .xls. Try creating a file with .xlsx extension. Then it might not prompt this message.

Cheers,
Arindam

Former Member
0 Kudos

Hi Arindam,

Thanks for reply. Either .xls or .xlsx will be fine, but client don't like to see that message.

Any sample program available in SAP to explore further?

Thanks.

arindam_m
Active Contributor
0 Kudos

Hi,

What is it that your trying to explore. Check the wiki link below:

http://wiki.sdn.sap.com/wiki/display/Snippets/Formatted+Excel+as+Email+Attachment

Also what is the data that you convert to .xls is it csv and you are giving extension as .xls ?

Cheers,

Arindam

Former Member
0 Kudos

Hi Arindam,

Yes, I am converting tab delimited data with extension .xls.

Any other way to suppress the popup window while opening the excel?

Thanks.

arindam_m
Active Contributor
0 Kudos

Hi,

I think the only way might be to make it comma separated with .CSV extention then you will not get it. And still if you want the .xls extension you might have to do a XML as suggested . This popup comes up whenever the format and extension mismatches and excel has to do some conversion. Tab delimited although displayable in .xls its still needs some xls conversion and thus the message.

Cheers,

Arindam

Former Member
0 Kudos

You could send comma-separated data with extension .csv as email attachment. It would open in excel without popup.

Former Member
0 Kudos

Hi Kumar,

There is a way but you will need to do away with XLS itself.

Try downloading it as a CSV file it will become excel automatically.

But if you still insist on XLS it is a tedious job using XML

http://scn.sap.com/people/naimesh.patel/blog/2009/02/10/abap-and-excel--create-formatted-excel-using...

Regards

0 Kudos

Hi Yakub,

I searched SDN, it seems it is tedious on XML, but I do not have other choice. I must display data without notification.

Link which you provided is to download to desktop I tried with that and that document also asking the options when I open. I need to send email attachment. Kindly provide any sap sample program if any or any blog/wiki.

Thanks for kind help.

0 Kudos

Hi Kumar,

First See this link http://support.microsoft.com/kb/948615

When you open a file in Microsoft Office Excel 2007 that contains content that does not match the files extension, you  receive the following warning message:

The file you are trying to open, 'name.ext', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?

Note The name placeholder is the file name and the ext placeholder is the file name extension of the file that you open in Excel 2007.

Your file extenuation type is .XLS it should be .XLSX

See this link how to made ABAP to XLSX file .

http://wiki.sdn.sap.com/wiki/display/ABAP/abap2xlsx

Regards,

Ramesh.T

former_member206395
Participant
0 Kudos

Hello,

Using the standard method, a tab dilimited file is created. For versions of office 2007 and above this file is still a text file with tab dilimited data rather than an .XLSX file/.XLS file.

Kindly go through the below link which talks about the open source free downloadable objects which will solve your problems quickly,

Link: http://scn.sap.com/community/abap/blog/2010/07/12/abap2xlsx--generate-your-professional-excel-spread...

0 Kudos

I used ABAP2XLS technology. with that we can create Excel document without mentioned popup.

Thanks.

0 Kudos

This message was moderated.