06-09-2014 7:27 AM
Hello Experts,
I am facing a problem to fulfill a requirement.
My requirement is....sending the data of the internal table to an external mail with attachment(excel format). I have done with this. But when o am opening the excel sheet(attachment) it is showing a message that 'The file you are trying to open is in different format than specified by the file extension'
I am using the extension 'XLS' and 'RAW ' in the coding for the file formats.
You can please suggest your solutions if you know or already faced this type of issues.
Thank you.
Regards,
Anand
06-09-2014 7:45 AM
06-09-2014 8:06 AM
Hi,
The system does not trust you....
I have the feeling that the file you are sending is a text file with the extension 'XLS'
If the file is comma separated values (http://en.wikipedia.org/wiki/Comma-separated_values) then
use the extension 'CSV' if it is a tab separated then use the extension 'TXT' .
Regards.
CSV is also good for tab separated I just checked by a copy of BCS_EXAMPLE_7 and changing: i_attachment_type = 'CSV' "#EC NOTEXT
06-09-2014 8:14 AM
Hi
Please check this program BCS_EXAMPLE_7 which has all the code and try to execute and check if you get same error when you this file
Nabheet
06-09-2014 8:21 AM
Hello Anand,
The Messae that you are getting while opening to the EXCEL, it is ok.
This same message you will get when you will download the table content from a table into a spreadsheet.
For e.g. go SE16 download the table VBAP entries using the download button.
Thanks
Gaurav
06-09-2014 8:25 AM
06-09-2014 8:34 AM
Hi,
The file might be in XLS format but the version of microsoft excel is different. The system on which you are opening the excel might have higher i.e latest version. So it's giving system message. But it will not harm the content of the excel sheet.
Regards,
Pravin
06-09-2014 10:53 AM
File format is governed by the specification and it does not depend on viewer/editor program version.